PDA

View Full Version : Hash Deleted and autoincrement by 2



Shaimaa T
09-15-2014, 02:58 AM
Hi All,


When I have a record that I copy and paste into a new record with one column having a unique constraint , I display message "Cannot insert duplicate code" then if not all values in the record are inserted , I get a #deleted in all columns


Refreshing , I find that the id is incremented by 2 instead of one.


That is if the previous record has ID 20 , the #deleted record has ID 22 .


Anyone has an explanation and ideas to avoid the #deleted which happens if not all columns are filled(an explanation for this too please)

ranman256
09-15-2014, 06:03 AM
If you are inserting recs and trying to insert an [ID] that is autonumber it will fail, and possibly skip that auto# because its a duplicate. (thus the 2)
Dont insert into the autonumber field.
(same with any field that is also set to NO DUPLICATES)

Shaimaa T
09-15-2014, 06:12 AM
I am not inserting into the autonumber field it is locked.

I want to know why I get the #deleted which happens only when I copy and paste an entire record without providing values for ALL the columns.