Run DBCC CHECKIDENT on the table(s) immediately after the error. This should
fix it for a while. Schedule DBCC CHECKIDENT to run periodically to keep
things under a fair amount of control.
DC
----- Original Message -----
From: "Matthew Fusfield" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 21, 2000 15:12
Subject: MS SQL 6.5 - identity field error
> Hi,
> One of our older application runs with a MS SQL 6.5 database behind it.
> Every now and then, when the app tries to do an insert on a table, we
> get a primary key violation. The key field is an identity field. When I
> remove the primary key constrant, I can do a few "dummy" inserts and the
> identity counter "catches up" but I'm not sure how it falls behind in
> the first place. When I reenable the primary key constrant, everything
> is fine until it randomly happens again.
>
> Any ideas?
>
> Thanks,
>
> Matt Fusfield
> ------------------------------------------------------------------------
> ------
> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> 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.
>
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
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.