Ignore my last post...ASCII has more than 36 characters...the point
still holds though.

-----Original Message-----
From: Andre Mohamed [mailto:[EMAIL PROTECTED] 
Sent: 17 March 2003 13:48
To: CF-Talk
Subject: RE: Using createUUID()

If you only use 4 characters then there are only roughly (10+26) to the
power of 4 = 1679616 different combinations... this is a relatively low
number which may or may not be considered unique enough for your
purposes. 

With only 100,000 records you already have nearly a 6% chance of a
collision.

André

-----Original Message-----
From: Robertson-Ravo, Neil (RX)
[mailto:[EMAIL PROTECTED] 
Sent: 17 March 2003 13:34
To: CF-Talk
Subject: RE: Using createUUID()

not sure what the odds could be : its not 1 in a thousand, I see your
point,
but in this instance, just include more chars or add your own rand
function...

though, Rand again but definition is not 'unique', there is a chance you
could get the same ID.

N

-----Original Message-----
From: Tony Weeg [mailto:[EMAIL PROTECTED]
Sent: 17 March 2003 13:36
To: CF-Talk
Subject: RE: Using createUUID()


but not the first four...the whole uuid in and of itself, would be,
however, you could conceivably
get the same striking everything but the first four....

...tony

Tony Weeg
Senior Web Developer
UnCertified Advanced ColdFusion Developer
Information System Design
Navtrak, Inc.
Mobile workforce monitoring, mapping & reporting
www.navtrak.net
410.548.2337 

-----Original Message-----
From: Robertson-Ravo, Neil (RX)
[mailto:[EMAIL PROTECTED] 
Sent: Monday, March 17, 2003 8:28 AM
To: CF-Talk
Subject: RE: Using createUUID()


erm... I would say that they are unique.  No UUID is the same by its
very
definition; thats the point...  

<sic/>
The mechanism used to guarantee that UUIDs are Unique is through
combinations of hardware addresses, time stamps and random seeds. 

No two comps can generate the same UUID.

"AFAIK"


-----Original Message-----
From: Sicular, Alexander [mailto:[EMAIL PROTECTED]
Sent: 17 March 2003 13:27
To: CF-Talk
Subject: RE: Using createUUID()


I wouldn't do that , first 4 chars of createuuid() are not unique. If
you cat that with something else than _maybe_ you are doing a bit
better. 

-----Original Message-----
From: Robertson-Ravo, Neil (RX)
[mailto:[EMAIL PROTECTED] 
Sent: Monday, March 17, 2003 8:18 AM
To: CF-Talk
Subject: RE: Using createUUID()


if you mean a UUID within SQL (i.e. 46 chr string such as A4534-34565E-
etc...) then you may be able to use newid() within mySQL, though I am
not sure that it supports it.

In CF, you could use : myUUID = Mid(CreateUUID(),1,4); to get the first
4 chars of a CF generated ID.

HTH

Neil

-----Original Message-----
From: Tangorre, Michael [mailto:[EMAIL PROTECTED]
Sent: 17 March 2003 13:04
To: CF-Talk
Subject: RE: Using createUUID()


Use the current date and add random numbers to the end:

03172003nn where 'nnn' are the random numbers.

To be honest with you... UUID is the way to go though, but this should
work.

#DateFormat(now(),"mmddyyyy")##Rand()##Rand()#




-----Original Message-----
From: FlashGuy [mailto:[EMAIL PROTECTED]
Sent: Monday, March 17, 2003 7:56 AM
To: CF-Talk
Subject: Using createUUID()


Hi,

I need to generate a unique ID for every form I submit. The createUUID #
generated is just too long for my needs. My ID only needs to be 10
characters in length. Something like:

CT-0001001

I'm using MySQL. Can I have mysql generate the unique ID? How could I do
this with CF?




---------------------------------------------------
Colonel Nathan R. Jessop
Commanding Officer
Marine Ground Forces
Guatanamo Bay, Cuba
---------------------------------------------------











~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to