Forum guidelines
AuthorQuestion
How To Rearrange The Auto Number Datatype Using C#
Posted on: 09 Dec 2012
I Have A Database Of MS-Access.In That I Have Taken S.No. As Auto Number DataType..
I Had Inserted Some Data..Now For Each Row An Auto Number Is Generated In A Sequencial Order For Example: 1,2,3 To so on...Now If I Delete A Row Which Is In The Middle Of All The Rows(Record), For Suppose I Have 1 2 3 4 5 6 7 8 9 10 Records Are There. If I Deleted 5th Record,Then In The S.No. Column(AutoNumber DataType) It Shows Only 1 2 3 4 6 7 8 9 10 by Missing The Deleted Number.

Now My Question Is That Can We Rearrange The S.No. Column Order As 1 2 3 4 5 6 7 8 9  in The MS- Access Database Using C# Windows Application.

pls Help Me..


AuthorReply
Re: How To Rearrange The Auto Number Datatype Using C#
Posted on: 09 Dec 2012  
As you'll see from this Microsoft Support article, resetting an auto increment field in MS Access is not a simple matter:

http://support.microsoft.com/kb/812718

Rather than go through this rigmarole, it might be better not to physically delete rows but to find some other way of marking them as deleted such as blanking non-required columns or, if the row contains some sort of status column, setting it to 'deleted'.


Re: How To Rearrange The Auto Number Datatype Using C#
Posted on: 09 Dec 2012  
ThanQ Vulpes For Your Information...I Will Refer It...

SPONSORED BY

Custom Software Development
MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.