Results 1 to 3 of 3

Thread: I have the problem!!

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2001
    Location
    VietNam
    Posts
    23

    Question I have the problem!!

    Hi guys !!!
    I am using VB to conect to sql server . now i have the problem that:
    I have a table in this table it have a fiedl that is automatic identity incrementally.
    for ex :
    that fiedl have 5 records : 1,2,3,4,5
    every time when i open the form in order to delete 1-4 after that I addnew, i have the new record is 6 . it 's ok for me. it's exactly.
    but when I delete 1-5 after that i addnew i have the new record that is : 6 ; so i want to be 1 ( because I have deleted all records,1-5 )but i have the result is 6; it' s not correct for me. so could anybody show me how to do that correctly.
    thank

  2. #2
    Addicted Member Rohan_Powle's Avatar
    Join Date
    Mar 2000
    Location
    Mumbai,maharashtra.India
    Posts
    173
    It works this way my friend
    The counter will go on adding a value no matter u delete previous records the counter will keep on updating...

    If u r facing problems u have to delete the indentity field & make a new one to start from one
    "Trouble Gives Experience & Experience Gives Wisdom."
    (accept troubles as they come to become more wise in life)
    - Regards Rohan

  3. #3
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Or

    change the field to a number and create your own ID counter. Although this also presents problems...Sometimes.

    Regards

    Vince

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width