0

I have a DataGridView control bound to an mdb file. The first field is id. I've not made the mdb file. When in the program I see that whenever I come to create a new row the id gets -1. if I leave it and go to another row indicating I'm not going to add a new row and return to it (last row) the field gets -2. When I repeatedly do this I see that the value gets decremented each time.

At first the mdb file has two rows with ids 1 and 2. If it's defined as an auto-increment field, it must be initialized with 3 each time, not to decrement each time.

Since this is my first try with DataGridView, please inform me about this behavior and how can i fix this?

4

0 に答える 0