Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2007

    Unanswered: Mysql AutoInc & C# data column AutoInc. sync problem

    dear sir

    now i have a problem and searched a lot and did not find any working solution ,

    now i have table with ID column which Primary Key & Auto Increment
    now if the current ID is 5 and i enter a row then i deleted it , so the next new ID should be 7 not 6 OK but the VS 2005 C# after using databinding.addnew() the c# get the last ID which 5 and inc. it by one so it will be 6 not 7 so how the sync between Mysql Autoinc & C# autoinc

    mysql autoinc. is normal and but the problem now in C# , the next new ID must be same in c# and mysql , i use also such ID in a linked table so the reuslt for example ID in Mysql is 6 but the ID generated in the c# is 5 and it stored in the linked table as 5 although in real it is 6 and no record with ID 5

  2. #2
    Join Date
    Apr 2002
    Toronto, Canada
    this does not appear to be a mysql problem | @rudydotca
    Buy my SitePoint book: Simply SQL

Tags for this Thread

Posting Permissions

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