[thelist] ASP Equivalent for CreateUUID() ?

Chris Evans chris at fuseware.com
Tue Apr 3 08:28:15 CDT 2001

Even though I use CF, I still roll my own.  when CF creates the UUID, it
uses part of the MAC address from the servers network card.  I believe this
is part of the standard.  During stress testing, we found this to be slow  -
about 1 second per UUID.

I have three parts to my UID.  The first part is the IP address of the
client machine converted to dotless notation, to reduce the size.  The
second part is the date/timestamp converted to UNIX time.  The third part is
a random number.  This works out to a maximum 32 character UID.

I have the CF code if anybody is interested.

Chris Evans
chris at fuseware.com

-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of Anthony Baratta
Sent: Tuesday, April 03, 2001 2:20 AM
To: thelist at lists.evolt.org
Subject: Re: [thelist] ASP Equivalent for CreateUUID() ?

At 10:59 PM 4/2/2001, you wrote:
>Hi Folks,
>Does anyone know if there is an equivalent ASP function that does this:
>cf function CreateUUID() which makes a unique, random, 35 character string.

I rolled my own - you are welcome to use or abuse as you see fit.

nBaseID = Right(Abs(DateDiff("s",Now,#1/1/1998#)),8)
varOrderNumber = Right(Year(now),2) & Month(now) & "-"
                  & Left(nBaseID,2) & "-" & Mid(nBaseID,3,3)
                  & "-" & Right(nBaseID,3)

This uses seconds from the #Date#. You can also add a random 4 digit number
to the end to increase the chances of uniqueness.

Also, there is a component you can use - if you have access to installing
ASP components:


Look for GUIDMaker.

Anthony Baratta
Keyboard Jockeys

For unsubscribe and other options, including
the Tip Harvester and archive of TheList go to:
http://lists.evolt.org Workers of the Web, evolt !

More information about the thelist mailing list