Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 5 of 5 total |
Problem with generated identity... |
Sun, Apr 27 2008 3:58 AM | Permanent Link |
Uli Becker | I have a table with about 300 000 records. There is an identityfield =
integer which is populated by code. Now I want to alter the column by a generated integer field. I set Generated = true, ByDefaultOnly = true, SeedValue = 299298, Increment = 1. When trying to insert a new record (in EDBManager) the ID is set to 1 and there is a key-violation off course. Obviously this only happens when adding the generation belatedly. With a new table the seedvalue works. What can I do? (I am not able to delete the field and recreate it because it's a foreign key). Thanks Uli |
Sun, Apr 27 2008 6:57 AM | Permanent Link |
Fernando Dias Team Elevate | Uli,
What version of EDB are you using, what is the current max value for the identity column ? -- Fernando Dias [Team Elevate] |
Sun, Apr 27 2008 7:29 AM | Permanent Link |
Uli Becker | Fernando,
> What version of EDB are you using, what is the current max value for the > identity column ? I am using the latest Version 1.09 B3, the current max value is 299298. Regards Uli |
Sun, Apr 27 2008 9:46 AM | Permanent Link |
Fernando Dias Team Elevate | Uli,
> I am using the latest Version 1.09 B3, the current max value is 299298. Then, you may try this: ALTER TABLE <TableName> ALTER COLUMN <ColName> RESTART WITH 299298 -- Fernando Dias [Team Elevate] |
Sun, Apr 27 2008 10:26 AM | Permanent Link |
Uli Becker | Fernando,
> Then, you may try this: > ALTER TABLE <TableName> ALTER COLUMN <ColName> RESTART WITH 299298 Thanks a lot, that did the job. Regards Uli |
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |