Auto Increment Problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vaniKanabathy
    New Member
    • Mar 2008
    • 52

    Auto Increment Problem

    Hi , i had a problem where if i delete 1 row manually , the next auto increment field do not follows the last one in database where by it continue with the auto no of i deleted one. like if the last record is 847 and i delete the record so now the last 1 should b 846 and when i insert 1 data via system it should be 847 but it being 848. please help me.
  • missinglinq
    Recognized Expert Specialist
    • Nov 2006
    • 3533

    #2
    What code are you using to generate your auto incrementing field?

    Welcome to bytes!

    Linq ;0)>

    Comment

    • mshmyob
      Recognized Expert Contributor
      • Jan 2008
      • 903

      #3
      If you mean you have an autonumber field then it is doing what it is supposed to do. Deleting an autonumber field does not allow you to reuse the number once it has been used even if you delete it.

      If you are creating the incrementation by code then you would need to post it.

      cheers,

      Originally posted by vaniKanabathy
      Hi , i had a problem where if i delete 1 row manually , the next auto increment field do not follows the last one in database where by it continue with the auto no of i deleted one. like if the last record is 847 and i delete the record so now the last 1 should b 846 and when i insert 1 data via system it should be 847 but it being 848. please help me.

      Comment

      Working...