Can Auto-Increment Column in DataTable decrement automatically?

rainstone
rainstone used Ask the Experts™
on
hi guys,
Got a problem here when dealing with DataTable.
I have a datatable with an Auto-Increment Column that counts the number of rows in the datatable. It works perfect when I insert records to the datatable.
However, when I tried to delete some rows from the datatable, the Auto-Increment Column seems unwilling to decrement and the existing values in that column remain unchanged.
Is there anyway that the value can automatically increment and decrement as I insert or delete records into/from the datatable? Can somebody suggest?
Thanks heaps!
rainstone.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
if all u need is to count the rows u can use datatable.count
using the auto-increment field to count rows is not a good idea bec as much as i know it can't be decremented

Author

Commented:
I got it.
I have written my own codes to keep track of the sequence number of rows in the datatable. merci boucoup.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial