random recordset without random function

Results 1 to 3 of 3

Thread: random recordset without random function

  1. #1
    Join Date
    Dec 1969

    Default random recordset without random function

    I would like to pull all available entries out of a recordset and then put them in a random order. I have tried a couple scripts off the web but for some reason when using a rnd fuction the recordset dispays randomly but always the same order the first time the page is loaded. Is there a way to do this without using a rnd type function.

  2. #2
    Join Date
    Dec 1969

    Default RE: try............

    try putting <BR>Randomize<BR><BR>at the top of your asp code<BR><BR>then u will get it different even the first time it loads

  3. #3
    Join Date
    Dec 1969

    Default You are looking at wrong end...

    ...of the problem!<BR><BR>Look here:<BR><BR>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/vsfctrnd.asp?frame=true<BR><BR>Read this part:<BR><BR>*** QUOTE ***<BR>Before calling Rnd, use the Randomize statement without an argument to initialize the random-number generator with a seed based on the system timer.<BR>*** END QUOTE ***<BR><BR>You *need* the RND function to get random numbers, period.<BR><BR>But if you leave out Randomize, you get the *same* "random" [technically, pseudo-random] numbers each time!<BR><BR>Just as you saw.<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts