473,320 Members | 1,949 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,320 software developers and data experts.

A little help with random records

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
Oct 26 '05 #1
1 1480
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)

Oct 26 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Keith Griffiths | last post by:
I'm trying to do a search under a set criteria followed by a selection of random entries meeting this criteria. But I don't seem to be able to achieve this. The idea being to search on say...
4
by: yf | last post by:
A KB article "http://support.microsoft.com/default.aspx?scid=kb;en-us;209599" tells that the maximum number of records that a table may hold if the PRIMARY key data type is set to AUTONUMBER is...
2
by: IceCube | last post by:
Hello, I would like to select/filter at random 30 records out of an Access-table of 1500 records. I know the option "Top" which gives me the possibility to see the 30 first records of the table...
4
by: Greg Strong | last post by:
Hello All, Is it possible to create multiple random numbers in a query where there are numerous records? I've created a custom function. When I use it in a query it creates the same random...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.