Forums

This topic is locked

Random Record Return

Posted 26 Oct 2002 02:37:35
1
has voted
26 Oct 2002 02:37:35 brad dunzer posted:
<font face='Verdana'>Using DMX. I am trying to return a random image and text to a page. The DB is Access. I have a image table with ID, imgurl, textfield. I have written my SQL statement
SELECT *
FROM imagetable
ORDER BY RND(id)
When I use the TEST button i get a random recordset back each time. However, when I run the page i get the last record of the table each time.
I am stumped
Thanks

Brad</font id='Verdana'>

Brad Dunzer

Replies

Replied 28 Oct 2002 16:08:16
28 Oct 2002 16:08:16 Brent Colflesh replied:
Dear Brad,
Is your ID field an autonumber primary key?

Regards,
Brent

Replied 28 Oct 2002 17:35:24
28 Oct 2002 17:35:24 brad dunzer replied:
Brent,

Yes the ID field is an autonumber primary key.

Any ideas?

Brad

Brad Dunzer
Replied 28 Oct 2002 20:36:13
28 Oct 2002 20:36:13 brad dunzer replied:
Update.

This might be an IIS thing. On my test server which is Windows 2000 i get the last record result when i run the page. But i transfered the file to my Windows 2000 Server box and i get the first record.

Very interesting

Brad Dunzer

Reply to this topic