Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 5 of 5 total |
Duplicate Key / Invalid last row identity value (0) |
Fri, Sep 7 2018 10:38 AM | Permanent Link |
Charalampos Michael | Hello,
I have a table filled with data and i change the "recordid" to be generated by EDB. (i previously made my own generated integer keys) Now if i append a record i get a "duplicate key" error "0" so i have to repair the table in order EDB to fix the LastAutoInc value. (My point is that EDB should Set the correct LastAutoInc value when altering the field) Thank you |
Fri, Sep 7 2018 10:49 AM | Permanent Link |
Fernando Dias Team Elevate | Hello,
If the column is populated with the old integer values, you have to tell EDB where to start from now on : ALTER TABLE <TableName> ALTER COLUMN <ColumnName> RESTART WITH <SeedValue> -- Fernando Dias [Team Elevate] |
Sun, Sep 9 2018 3:43 AM | Permanent Link |
Charalampos Michael | Fernando,
<< If the column is populated with the old integer values, you have to tell EDB where to start from now on : ALTER TABLE <TableName> ALTER COLUMN <ColumnName> RESTART WITH <SeedValue> >> Well, my point was EDB should do that automatically. Thank you |
Sun, Sep 9 2018 10:12 PM | Permanent Link |
Raul Team Elevate | On 9/9/2018 3:43 AM, Charalampos Michael wrote:
> Well, my point was EDB should do that automatically. I disagree - otherwise one could not do alter without resetting seed value each time. Raul |
Mon, Sep 10 2018 4:21 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Michael,
<< I have a table filled with data and i change the "recordid" to be generated by EDB. (i previously made my own generated integer keys) Now if i append a record i get a "duplicate key" error "0" so i have to repair the table in order EDB to fix the LastAutoInc value. (My point is that EDB should Set the correct LastAutoInc value when altering the field) >> This FAQ explains the rationale for why it works the way that it does: https://www.elevatesoft.com/supportfaq?action=view&category=edb&question=altering_identity_seed_value Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Tuesday, September 17, 2024 at 04:19 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |