I’ve set up a SQL Server Compact 3.5 database in my WinForm application. I set my ID identity to true so that when the user adds to the database it will automatically give it an ID and automatically increment it. However, for some reason after the first item is entered into the database the ID goes to -1 and then -2, -3, etc. How come it doesn’t increment correctly? Did I set it up incorrectly?
Update:

Another Update: I ran the application and added 4 things to the database, closed the application and opened it again. When I did this all the id’s were suddenly correct. It’s like the id is only incorrect when when it’s first added, but when the database is reloaded it’s correct. Hopefully that made sense.
Found the solution in this thread:
Negative Primary Keys
Based on the information provided in that thread this occurs because I’m using a DataSet and a DataAdapter in my application.