thanks, robin.
i am
prepared to take the chance at odds of 16,777,216 to 1 (for any given
millisecond)!
works
like a charm.
regards... steve
--------Original Message-----
From: Robin Hilliard [mailto:[EMAIL PROTECTED]
Sent: Thursday, 11 September 2003 10:35 PM
To: CFAussie Mailing List
Subject: [cfaussie] Re: a long shot...I mucked around and came up with this:<!--- For any given millisecond, about a 1 in 16,777,216 chance of a duplicate UUID
About the best we can do in 16 characters ---><cffunction returntype="string" name="sortaUUID"><!--- Make sure we're the only ones on the server using this particular timestamp --->
<cflock type="exclusive" timeout="1">
<cfscript>
ts = ((now() + 0) * 10000000) & ""; // now() + 0 gives timestamp with 12 significant digits in CFMX
tsl = left(ts, 6); tsh = right(ts, 6); // have to break in half for formatBaseN() to handle
writeOutput(ucase(formatBaseN(tsl, 16) & formatBaseN(tsh, 16)) & left(hash(createUuid()), 6));
</cfscript>
</cflock>
</cffunction><cfoutput>#sortaUUID()#</cfoutput><[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]...This is a long shot but worth asking... ---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MX Downunder AsiaPac DevCon - http://mxdu.com/
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MX Downunder AsiaPac DevCon - http://mxdu.com/
