Be carefull using @@IDENTITY, as it can return erroneous information (especially if your tables have triggers associated with them). If you are using SQL Server 2000, use the SCOPE_IDENTITY() function instead of @@IDENTITY.
Cheers,
Jeff Garza
----- Original Message -----
From: Rob
To: CF-Talk
Sent: Thursday, March 11, 2004 11:32 AM
Subject: RE: Reliable way to get ID of inserted record
On Thu, 2004-03-11 at 10:16, Burns, John wrote:
> But won't it eventually come back in and fill in some of those ones that
> were previously deleted? As in your example, at some point won't
> another item get assigned the value of 4?
MSSQL servers identity columns just keep going untill it they fill up a signed 32
bit integer (I believe might even be larger 2,147,483,648), at that point it flips around
and starts over at 1. So unless you think you'll get that many request between inserts
- which would be rad! - you should be fine.
--
Rob <[EMAIL PROTECTED]>
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- Reliable way to get ID of inserted record Burns, John
- Re: Reliable way to get ID of inserted record Scott Weikert
- Re: Reliable way to get ID of inserted record Rob
- RE: Reliable way to get ID of inserted record Barney Boisvert
- RE: Reliable way to get ID of inserted record Josh Remus
- RE: Reliable way to get ID of inserted record Eric Creese
- RE: Reliable way to get ID of inserted record Burns, John
- RE: Reliable way to get ID of inserted record Burns, John
- Re: Reliable way to get ID of inserted record Kwang Suh
- RE: Reliable way to get ID of inserted record Ben Densmore
- CFLOCKING on CFFILE/CFDIRECTORY brobborb