I made a small software with C#. When I add a new record auto-increment doesn't work well like records are 1, 2, 3, 4, 5, 6, then it should be 7 but it goes to 1025, 1026, 1027, then again it goes to 2035, 2036, 2037 it doesn't work well.
Insert code:
DateTime date = DateTime.Now;
mycon.Open();
SqlCommand cmd = new SqlCommand("insert into Bill (Date, Time, Cashier, Amount, Patient) values('" + DateTime.Now + "','" + date.ToString("hh:mm") + "','" + "Ahmad" + "'," + lbltotaldu.Text + ",'" + txtpatient.Text + "')", mycon);
cmd.ExecuteNonQuery();
mycon.Close();