Hi Sean...

>I find it very interesting that people don't recommend the use of UUID
>as DB keys.  In this way, using CreateUUID, CF would already know the
>key value and the DB INSERT would proceed on it's own.

I wasn't making any recommendations, I was simply answering a question that 
was asked :^)

Personally, I don't recommend MAX() OR UUID for unique keys... .the only 
method I use, unless impossible to do (as in Access), is the @@IDENTITY 
method of a Stored Procedure.   I will always use Stored Procedures where 
possible as these can be far quicker than using CFQUERY.  Any stored 
procedure that does an INSERT, in my opinion, should always return 
@@IDENTITY to get the value of the key.  I don't think there is any faster, 
or more reliable (post SQL Server 6.5! :^) way of inserting and returning a 
unique key.


>The suggestion, which is often made, that the use of the MAX() function
>is a simple call, are making significant assumptions about the DB
>engines which might be used.  While SQL Server might treat MAX() of the
>key in an optimized fashion, not all DBs would or do (I know of at least
>one).  Equally, the additional DB call to obtain the MAX() value,
>increases the length of the transaction which can introduce
>concurrency/locking issues (not to be overlooked in high volume
>applications).

I totally agree with you.

>What am I missing?

erm, nothing really... it was my wording... It definitely wasn't making a 
recommendation, I was sort of answering the question about how you do it in 
Access, as the @@IDENTITY method doesn't work in Access 2000 stored 
procedures (Queries).

All the best

Nick

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to