Click here to Skip to main content
15,886,806 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi
in my table have a primary key but the key not be the correct order..

like below

C#
primaryKey   name
----------   ----
4             A
5             B
6             C
9             D
10            E
14            F


i want make correct order

VB
primaryKey   name
----------   ----
1             A
2             B
3             C
4             D
5             E
6             F


that is possible..

Regards
AR
Posted

1 solution

The order seems the same in your both examples, but I think that you want to change the value of your primaryKey, and this filed is auto-number (auto-increment) and some records were deleted and this generated the gaps between key values; to do this you have to edit the primaryKey field type from auto-number to normal integer, then to edit the value as you want, and at the end to edit back the primaryKey to be auto-number.
 
Share this answer
 
Comments
An@nd Rajan10 13-Mar-14 2:23am    
i can't edit ..
Raul Iloc 13-Mar-14 2:33am    
You have to open your table in "Design Mode" then to edit the type of your field.
An@nd Rajan10 13-Mar-14 2:39am    
there is have any other methods..

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