AutoIncrement
-
I inserted three records into table Products(ProductID, ProductName) with ProductID set to AutoIncrement. Three records with ProductID were 1, 2, 3. After that i deleted three recored and insert the fourth record. This record would got the the productID's value is 4 How could i set the ProdudctID of this record to 1, just like the beginning. Thanks
-
I inserted three records into table Products(ProductID, ProductName) with ProductID set to AutoIncrement. Three records with ProductID were 1, 2, 3. After that i deleted three recored and insert the fourth record. This record would got the the productID's value is 4 How could i set the ProdudctID of this record to 1, just like the beginning. Thanks
vuthaianh wrote:
How could i set the ProdudctID of this record to 1, just like the beginning.
I’m guessing you’re using MS Access; the only way to re-start the counter is to compact / repair the database. It only works when there are no other data connections open and when no records exist in the table. Hope this helps.
ZeePain! wrote:
This seems like one of those programs that started small, grew incrementally, building internal pressure, and finally barfed all over its source code sneakers. Or something.