hi. we're having some problems when inserting new records into a table. <br>
<br>
this table contains an identity column which is also its primary key. frequent deletion and addition of records occurs to the said table. upon inserting a row, it <b>sometimes</b> returns this error: <br>
<b>" rdo error : 23000: [microsoft][odbc sql server driver][sql server]violation of primary key constraint 'pk___22__10': attempt to insert duplicate key in object 'md'."</b><br>
<br>
knowing that we never included the primary key column in the insert stmt., and sometimes insert command is also successful, we're having a hard time analyzing what seems to be the problem. until such time we found a topic in <i>sql server books online</i> about <b>identity property</b> stating "if a row was accidentally deleted, an identity value can be re-created and reconstructed" and that "if an <b>identity</b> column exists for a table with frequent deletions, gaps can occur between <b>identity</b> values. if this is a concern, do not use the identity property."<br>
<br>
we're alarmed with this information and we simply want to ask if there's anything you could suggest to solve our problem. re-creating the table is the last in our list of solutions since there are already thousands of data in the database.<br>
<br>
we'll be very grateful if you can share us your knowledge. thanks.<br>
<br>
<br>
this table contains an identity column which is also its primary key. frequent deletion and addition of records occurs to the said table. upon inserting a row, it <b>sometimes</b> returns this error: <br>
<b>" rdo error : 23000: [microsoft][odbc sql server driver][sql server]violation of primary key constraint 'pk___22__10': attempt to insert duplicate key in object 'md'."</b><br>
<br>
knowing that we never included the primary key column in the insert stmt., and sometimes insert command is also successful, we're having a hard time analyzing what seems to be the problem. until such time we found a topic in <i>sql server books online</i> about <b>identity property</b> stating "if a row was accidentally deleted, an identity value can be re-created and reconstructed" and that "if an <b>identity</b> column exists for a table with frequent deletions, gaps can occur between <b>identity</b> values. if this is a concern, do not use the identity property."<br>
<br>
we're alarmed with this information and we simply want to ask if there's anything you could suggest to solve our problem. re-creating the table is the last in our list of solutions since there are already thousands of data in the database.<br>
<br>
we'll be very grateful if you can share us your knowledge. thanks.<br>
<br>