That's almost exactly what I've done... It seems to work.
The Insert() function works a bit quicker.
I was thinking of using Varchar(35), but although I don't
understand all the inner workings of how SQL Server stores
it data, I would imagine if they made a datatype for UUIDs,
it's more efficient. I would imagine (hope) it stores it as
hexadecimal rather than a 35-character string.
Thanks again for all the comments/suggestions.
Norman
Quoting "Jones, Matt" <[EMAIL PROTECTED]>:
> you could create a custom tag that does something
> like this
>
> <cfset newUUID = createuuid()>
>
> <cfset newUUID = mid('#newUUID#',1,23) & "-" &
> mid('#newUUID#',24,12)>
>
> <cfset caller.newGuid = #newUUID#>
>
>
> -----Original Message-----
> From: Norman Elton [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 16, 2001 7:17 PM
> To: CF-Talk
> Subject: UUID Woes
>
>
> I'm starting to use UUIDs as primary keys, and they
> work
> great. Using Ingres, I just stored them as strings,
> and
> indexed them to be primary keys. According to the
> Ingres
> gurus, this wasn't a big deal.
>
> I was happy to see that MS SQL 2000 has native
> support for
> UUIDs. Unfortunately, their idea of a UUID is a bit
>
> different from ColdFusion:
>
> MS SQL:
> xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
> ColdFusion:
> xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxx
>
> Needless to say, SQL won't accept ColdFusion's
> UUIDs. Does
> anyone know a way to get around this and allow
> ColdFusion
> to specify UUIDs to SQL?
>
> Thanks!
>
> Norman Elton
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists