Since you're using a loop, use a condition, where, if the last number created was even, then create a random number that is 20 digits long.  If it was odd, then create a random number that is anywhere from 10 to 15 digits long.  If you want to go really crazy, you can ALSO prepend the last 3 digits of the previous number to the new number.  (so if the previous number was 72634733628, the new number could be something like 72638847463377463223648 (23 digits)

  ----- Original Message -----
  From: Nick Baker
  To: CF-Talk
  Sent: Thursday, January 22, 2004 12:08 AM
  Subject: How do you get a random, random number?

  CF5
  MS Access

  To test a site I need to populate a DB with random values. I haven't been
  able to find a way to get really random numbers

  Using Randomize() to seed RandRange() doesn't seem to get the job done,
  unless you can come up with a random number to use with Randomize().  I am
  using a loop to populate the DB, so this makes using even the seconds from
  something like Now() and GetTickCount() as Randomizers ineffective.

  Ideas and/or suggestions would be greatly appreciated.

  Thanks,

  Nick
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to