Error when insert data to sql

  • Thread starter Thread starter ahmeddc
  • Start date Start date
A

ahmeddc

Guest
hi

I encountered a problem when entering data, and it is added without problems, but suddenly the number of the auto-numbering field starts with 1000

What is the potential mistake ??

1613662.png

Dim com As New SqlCommand("INSERT INTO client (code,name,company,address,telephon,mail,note,date,active) VALUES (@code,@name,@company,@address,@telephon,@mail,@note,@date,@active)", con) '
com.Parameters.AddWithValue("@code", CLIENTUPDATE.LAB_CODEVAL.Text)
com.Parameters.AddWithValue("@name", CLIENTUPDATE.TEXT_CLIENTNAM.Text)
com.Parameters.AddWithValue("@company", CLIENTUPDATE.TEXT_CLIENTCOMP.Text)
com.Parameters.AddWithValue("@address", CLIENTUPDATE.TEXT_CLIENTADDRES.Text)
com.Parameters.AddWithValue("@telephon", CLIENTUPDATE.TEXT_CLIENTTELEPHON.Text)
com.Parameters.AddWithValue("@mail", CLIENTUPDATE.TEXT_MAIL.Text)
com.Parameters.AddWithValue("@note", CLIENTUPDATE.TEXT_CLIENTNOT.Text)
com.Parameters.AddWithValue("@date", CLIENTUPDATE.DATATIM_DATERECOR.Value.ToShortDateString)
com.Parameters.AddWithValue("@active", True)
con.Open()
com.ExecuteNonQuery()
con.Close()

Continue reading...
 
Back
Top