473,657 Members | 2,566 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to get random records from msaccess table connected to java applet

44 New Member
sir,
i have a java applet j2sdk1.4.1_01 .i am using msaccess database .
Class.forName(" sun.jdbc.odbc.J dbcOdbcDriver") .
in my program i want to get records from access table in a new frame randomly(random records).In my frame i have next button now if i click next button, next record is coming from the table.
i want to get random records from the table and come on the frame one by one when i click next button.
how to write code in java.
please help me.
thanks in advance.
Apr 13 '07 #1
3 2663
r035198x
13,262 MVP
sir,
i have a java applet j2sdk1.4.1_01 .i am using msaccess database .
Class.forName(" sun.jdbc.odbc.J dbcOdbcDriver") .
in my program i want to get records from access table in a new frame randomly(random records).In my frame i have next button now if i click next button, next record is coming from the table.
i want to get random records from the table and come on the frame one by one when i click next button.
how to write code in java.
please help me.
thanks in advance.
First determine the number of rows(results) you have say n. Then generate a random number (r) between 1 and n. You then call resultest.next( ) r times before displaying the result.
Apr 13 '07 #2
neelesh kumar
44 New Member
sir,
please give the code.i didnt get random records from the table.please give code.
Thanks in advance
Apr 16 '07 #3
r035198x
13,262 MVP
sir,
please give the code.i didnt get random records from the table.please give code.
Thanks in advance
Which part did you get stuck on?
Apr 16 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
3103
by: Luke | last post by:
Hello, I am the administrator for http://www.nickberg.org - Nick is the man who was recently beheaded in Iraq. He was a very ingenious man - once for my birthday had gave me a small box wrapped in duck tape with a few diodes and two wires sticking out. When attaching the wires to your skin the diodes would light up in a random configuration. (he later modified this into a skin resistance
3
1689
by: RC | last post by:
Dear Dudes, I post this in multiple groups for opening brain storm. Sometime I need to query the data from database server then display them into user's browser in HTML <table>. But if the <table> is very LARGE, let's say 20 columns, hundreds rows. Usually you have header <th> tags on 1st (top) row and 1st (most left) column. For a such LARGE <table>. you really want:
2
13515
by: Tim Murray | last post by:
First of all, I don't know much about Java, even its naming and version numbering nomenclature, and second, if there is a better group to ask this in, please let me know. System is Mac with 10.4.4. I have Java 1.3.1 and 1.4.2 plug-ins, and J2SE 5.0 (1.5.0) installed. The Java preferences application lets me choose J2SE 5 or 1.4.2 to run applets via a browser. The problem happens in both settings. The problem is that we have a...
0
1095
by: neelesh kumar | last post by:
sir, i have a java applet.i am using msaccess database . Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"). in my program i want to get questions from access table questions in a new frame randomly(random questions).in my frame i have next button now if i click next button, next question is coming from the table. i want to get random questions from the table.for example if the test has 10 questions then 10 random questions have to be...
2
1419
by: news.microsoft.com | last post by:
Hi all, I'm developing an asp.net web site and since http is not a connected protocol I'm asking for some suggestions on to which technology should I use to build a "connected panel" into my application. This is what I'm trying to achieve.: Navigation Menu ----------------------------------------------------
2
3437
by: dev24 | last post by:
Hi guys, I was looking at random maze generators on the web. I found this prims algorithm but everytime I run it, it doesnt display the random maze as it should. It just displays a blank applet. Also, does any one know how to save this generated applet to a png or jpg format? Source code is attached below. Thanks. ********************************************************************************************* package ares; import...
3
2001
by: Icemokka | last post by:
Hi, I've got a table in MsAccess with 100+ fields. If I fill a tabletable with this table , change some values , get the update-command via commandbuilder , the update fails. This because the commandbuilder adds a where clause that contains all the fields in the datatable ( to check whether the record has been changed since the fill ). Because MSAccess does not allow more then 99 fields in the where clause, the update fails offcourse.
2
2650
by: Helmer | last post by:
i am in programming class trying to make an applet involving random placement of colored blocks, but an error is created when i try to run it saying "no method named "random" was found in type "Math". " i have imported java.awt like so: import java.awt.*; and this is the random number statement: g.fillRect((int)(Math.random()*getSize().width),(int)(Math.random()*getSize().height),20,20); any help you can provide will be greatly...
0
8310
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8827
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7333
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4158
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2731
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1957
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.