DataTable AutoNumber Seed

  • Thread starter Thread starter Nitin
  • Start date Start date
N

Nitin

I have a field in a DataTable with its AutoIncrementSeed = 1 and and
AutoIncrement='True' when I remove all the rows from the Table how can I
reset the Autonumber field's seed to 1 so that it forgets its previous
autonumber value and starts fresh from 1
Regards,
Nitin
 
Nitin,

Just an advice, forget the autoseed if that is possible and start using
GUID's for the uniqueidentifier, that will probably make your life a lot
happier.

Just my thought,

Cor
 
You need to compact the database to restart the autonumber. I do not know
the command for it in .NET though
 
Daniel,

Your answer is about the database itself not in the datatable.

(In the datataset you need to do a clear of the datatable and to fill that
table again).

Nothing wrong with your answer, just to make it clear.

Cor
 
Back
Top