Click here to Skip to main content
15,949,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am begginers in c sharp . I want to make a simple project in c # with sql database. I creat a table name "updatetbl in database name test1 and fill the record as bellow

accountno sequence
1001 25
1001 5
1001 7
1001 9
1001 10
1001 15

accountno,sequence is int

Now I want to update programatically in single click button to update the value has been changed as bellow example.

accountno sequence
1001 1
1001 2
1001 3
1001 4
1001 5
1001 6
Posted

1 solution

You will need to update the datasource with an incremental number.

Create a counter which is incremented everytime you assign it to a row of the datasource.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900