I'm writing a program to choose a random record from several databases and place the random records into a database.
I'm not too sure how to generate a random record from a recordset. Should I use the following code (provided that RS is my recordset object). Note: this is untested so if there are any errors don't worry about it.
<%
rs.movefirst
RANDOMIZE
Dim random
random = (rnd(1)) * 123456
random = Round(random)
While random > 0
rs.movenext
random = random - 1
Wend
%>
If i'm correct this code should place the record pointer on a pseudo random record.
Thanks,