Auto increment field 
Author Message
 Auto increment field

Anyone know why I would be getting key violation on an auto icrementing
primary key field when I've only got the latest record at a value of 1259?
No matter what I do for some reason, I can't get out of it?


Fri, 27 Feb 2004 13:23:59 GMT  
 Auto increment field
Thanks for all the answers guys! lol

Seriously, after a whole morning of searching I found the answer on a
NON-Borland site. Apparently a common problem.

If any one else afflicted, let me know.



Sun, 29 Feb 2004 12:06:32 GMT  
 Auto increment field
I've had this problem once (paradox tables ?)

Probably your table got corrupted and the autoincrement field tries to
increment to a value that already exists in the table, hence the
key-violation. The record that already exists may even be a deleted one, so
it might no longer be visible...

I played around with the table a bit in the Database Desktop (e.g. delete
the last record and then do a restructure with the 'pack table' checkbox
set, or remove and reinstall the primary index...) This worked for me......

That's paradox for you ! Are you using the tables in a networked environment
? Don't do that !

Regards, Jaap


Quote:
> Anyone know why I would be getting key violation on an auto icrementing
> primary key field when I've only got the latest record at a value of 1259?
> No matter what I do for some reason, I can't get out of it?



Sun, 29 Feb 2004 21:11:53 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Master-detail and auto-increment fields

2. Need help defining auto-incrementing field using TTable.Create

3. Auto Increment Fields and Master Details Relationship

4. Question about auto increment field

5. Delphi 2 SQL Server 6 problem with identifier (auto-increment) fields

6. Auto-increment fields - Should I Use Them?

7. Obtaining value of Paradox's Auto-Incremented Field Type

8. How to reset auto- increment Fields

9. Auto-increment fields

10. Delphi3-auto-increment fields

11. Auto-increment field copy

12. Q: Are Paradox auto-increment fields safe?

 

 
Powered by phpBB® Forum Software