Alan McCollough
Web Programmer
Allaire Certified ColdFusion Developer
Alaska Native Medical Center

> -----Original Message-----
> From: Max Paperno [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, December 15, 2000 1:26 PM
> To:   Fusebox
> Subject:      Re: inserting your own UUID into a db table
> 
> 
> Hi Alan,
> 
> Wondering if you've considered this... From SQL7 BOL:
> 
> "A GUID is a binary number that is guaranteed to be unique" and 
> 
> "A column or local variable of uniqueidentifier data type can be
> initialized to a value in two ways: 
> 1) Using the NEWID function. 
> 2) Converting from a string constant in the following form
> (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, in which each x is a hexadecimal
> digit in the range 0-9 or a-f). For example,
> 6F9619FF-8B86-D011-B42D-00C04FC964FF is a valid uniqueidentifier value." 
        That's just what my tag barfs out. a string that goes 8-4-4-4-16
byte hex chars, with a hyphen between the sequences.

> Also "Comparison operators can be used with uniqueidentifier values."
Ah, but you CAN say "SELECT * from foo where uid =
'44E7AC85-2B37-239C-139C-139E00CA12D25027'. And, that's the only thing I'm
using this for.

> Anyhow, I had a look at your tag and it seems it just generates something
> that looks like a UUID/GUID but is not actually in the correct format...
        I think you have to look at the intent of the UUID. It is vitally
important to this nation that we count each and every UUID, and not let any
valid UUIDs be ignored simply due to the failings of technology. You know,
if you ignore UUIDs simply because they wern't generated by the NEWID()
function, you stand to disenfranchise a huge sector of the American
populace, and indeed the developer community at large worldwide!

> BTW, does CF still generate a UUID that is too short?  Or did they fix
> that in a service pack?
        Theirs is still too short...

> I've been doing a DB call and using SQL7's NewID() function to generate
> UUIDs (doesn't do much for Access users, I know).  Your tag is cool
> anyhow, I just wonder if calling it UUID might be misleading.
        My tag produces a UUID that is insertable into a uniqueidentifier
field as is. Looks like a UUID, walks like a UUID, quacks like a UUID...
> Kind regards,
> -Max
> 
> 
> 
> At 12/15/2000 09:11 AM -0900, you wrote:
> >Along the lines of Steve N's recommendation to insert your own ID fields
> >into db tables, I present, 
> >(drumroll)
> >CF_UUID ! Ta-da! Yeah, yer all saying 'so what..." Well, I'll tell ya
> what.
> >This came out of my need to manually stick in a UUID into a table, it
> >relates to that Crystal Reports thing I mentioned in a separate thread
> >yesterday.
> >
> >I tried using the built-in createUUID() function, but if you want to see
> >some pretty lame UUID, try CFLOOPING it a hundred times. Out of the
> entire
> >UUID string, maybe 3 chars will change over the entire loop. 
> >
> >SoOoOo, not willing to use other's UUID tags cuz' I wanted to roll my
> own, I
> >cooked up CF_UUID (can you believe NOBODY named their tag CF_UUID yet?),
> >which went up to the Allaire Tag Gallery. 
> >
> >Ya can also snag a copy at www.anthc.org/skunkworks ...
> >
> >
> >(and a shameless, seriously shameless plug... Go to www.mp3.com/kittycat
> and
> >listen to my songs. I've got one tune hovering at #11 on the
> >alternative-grunge chart)
> >
> >Alan McCollough
> >Web Programmer
> >Allaire Certified ColdFusion Developer
> >Alaska Native Medical Center
> 
> 
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to