A little help with random records

J

Jeff Uchtman

I have read 10000 opinions on returning random records and I am more
confused now that before I started. I have a small access db that will
contain 20 or so rows with 3 or 4 columns. I like to return a set of 6
distinct rows and display the columns in html. I have seen response.write
and loops but can't I throw the 6 random rows in a array and pull the data
as I need it in the page? Examples?

More confused than ever
Jeff
 
E

Evertjan.

Jeff Uchtman wrote on 26 okt 2005 in
microsoft.public.inetserver.asp.general:
I have read 10000 opinions on returning random records and I am more
confused now that before I started. I have a small access db that
will contain 20 or so rows with 3 or 4 columns. I like to return a
set of 6 distinct rows and display the columns in html. I have seen
response.write and loops but can't I throw the 6 random rows in a
array and pull the data as I need it in the page? Examples?

Why would you do that? It is quite possible with a serverside array with
all records data, but at least tat would be uneducational.

I hope your records have an unique index field.

Simply get an array of the available index numbers and randomly select 6.

Then pull the 6 from the database, using "SELECT ..WHERE id = " & IDnumber

A mdb-database is random access.

If you get stuck in some part of your coding this NG will help you out.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top