Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > A little help with random records

Reply
Thread Tools

A little help with random records

 
 
Jeff Uchtman
Guest
Posts: n/a
 
      10-26-2005
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


 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      10-26-2005
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.



--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Math.random() and Math.round(Math.random()) and Math.floor(Math.random()*2) VK Javascript 15 05-02-2010 03:43 PM
random.random(), random not defined!? globalrev Python 4 04-20-2008 08:12 AM
1 little 2 little 3 little Kennedys dale Digital Photography 0 03-23-2008 01:03 PM
Delete records or update records Dan ASP General 1 05-10-2004 01:25 PM
match muliple header records to associated detail records Luke Airig XML 0 12-31-2003 12:06 AM



Advertisments