473,385 Members | 1,973 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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

sir,
i have a java applet j2sdk1.4.1_01 .i am using msaccess database .
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").
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 2653
r035198x
13,262 8TB
sir,
i have a java applet j2sdk1.4.1_01 .i am using msaccess database .
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").
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
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 8TB
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
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...
3
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...
2
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...
0
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...
2
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...
2
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....
3
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...
2
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
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...

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.