Shuffling / Random

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John

    Shuffling / Random

    Hi, i have a db where ± 15 users stores multiple second hand items with
    images.
    Now i wish to display on the openingpage a list of all users with 1 item +
    image. So far no problem.

    But now i wish to change the order of the users every time the pages open.

    How can i shuffle the recordset before i load the users in a array, or how
    can i shuffle the array after populating with the users?
    Thx - John.

    x=1
    RS.open "SELECT DISTINCT * FROM tblUsers"
    Do While Not RS.Eof
    users(x) = RS("usr_vat"):x =x+1
    RS.MoveNext
    Loop
    RS.Close



  • Aaron [SQL Server MVP]

    #2
    Re: Shuffling / Random



    --
    Please contact this domain's administrator as their DNS Made Easy services have expired.

    (Reverse address to reply.)




    "John" <n o b o d y@spam.com> wrote in message
    news:s1Tcd.2823 02$CK6.14220382 @phobos.telenet-ops.be...[color=blue]
    > Hi, i have a db where ± 15 users stores multiple second hand items with
    > images.
    > Now i wish to display on the openingpage a list of all users with 1 item +
    > image. So far no problem.
    >
    > But now i wish to change the order of the users every time the pages open.
    >
    > How can i shuffle the recordset before i load the users in a array, or how
    > can i shuffle the array after populating with the users?
    > Thx - John.
    >
    > x=1
    > RS.open "SELECT DISTINCT * FROM tblUsers"
    > Do While Not RS.Eof
    > users(x) = RS("usr_vat"):x =x+1
    > RS.MoveNext
    > Loop
    > RS.Close
    >
    >
    >[/color]


    Comment

    Working...