Emptied of expectation. Relax. (tinyjo) wrote,
Emptied of expectation. Relax.
tinyjo

  • Mood:
  • Music:

Not random enough.

I'm putting in a random quote on my journal and friends pages and I'm having a little problem getting it random enough. I couldn't get the SQL server rand() function to work in Access, so I'm using VBs Rnd function to give me a number between zero and 1 which I then use to pick out one of the 115 quotes in my db. So far so good, except that it always seems to come up with the same quote. The seed I'm using for Rnd is Day Month Year Hour Minute Second. I'm lazy so I haven't checked whether it's always generating the same number or it's just the first couple of decimal places which are always the same, but either way, not helpful. Any suggestions?

In other weirdness, last week, no asp page which accessed the database would load from my local server - it just gave me an error message when I tried to open the db connection. Today, as I found out when I went to check the error message to ask you guys about it, it's fine. Who can fathom the ways of IIS?
Subscribe
  • Post a new comment

    Error

    Comments allowed for friends only

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 3 comments