> possible to return the same ID to two different "users" if they make a
> request at the "same" time. Personally I avoid this method of finding a
> unique id.
One thing I would say about the use of MAX(ID) is that if you are going to
use it, you need to lock access down to it using cflock to avoid the
situation described above....
Place this around the entire section of code from just before the select
query until just after the insert query....
<cflock name="MAXIDCriticalSection" type="exclusive" timeout="30">
.....
</cflock>
It is a performace hit but you will not have people attempting to insert
duplicate IDs into your database, guaranteed!
Paul
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

