i have student table and student_id is primary key ,there is another column adm_no and i want when i admit new student adm_no increment by one without skipping i.e 1001 ,1002 etc
int x = 0;
x = x + 1;
tStudent.adm_no = Convert.ToInt32(txtadm.Text) + x;
i have the above code but not working .
any assistant will be highly appreciated

Jagdev MishraRank #1,819 · 815 reputationPosted May 29, 2015, 12:15 AM EDT
Carlos kambuiRank #2,642 · 528 reputationPosted May 29, 2015, 12:20 AM EDT
Carlos kambuiRank #2,642 · 528 reputationPosted May 29, 2015, 12:24 AM EDT
Jagdev MishraRank #1,819 · 815 reputationPosted May 29, 2015, 12:25 AM EDT
Carlos kambuiRank #2,642 · 528 reputationPosted May 29, 2015, 12:29 AM EDT
Khargesh RajputRank #616 · 3.9K reputationPosted May 29, 2015, 12:30 AM EDT
Carlos kambuiRank #2,642 · 528 reputationPosted May 29, 2015, 12:35 AM EDT
Khargesh RajputRank #616 · 3.9K reputationPosted May 29, 2015, 12:43 AM EDT
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted May 29, 2015, 1:19 AM EDT