TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Guruprasad Shreegiri
NA
65
6.3k
Generate next ID's with prefix 'AE' to label C# to sql
Sep 3 2016 3:40 AM
If I delete in between one record in master table
, next auto generate id gives duplicate value
how to solve this
string empid = "AE000";
con.Open();
SqlCommand cmd = new SqlCommand("select Count(REGISTRATION_ID) from CANDIDATE_MASTER", con);
int i = Convert.ToInt32(cmd.ExecuteScalar());
con.Close();
i++;
Label1.Text = empid + i.ToString();
REGISTRATION_ID
AE0002
AE0004
AE0005
AE0006
If i execute that code ,label will get the value like 'AE0005'
i want to generate next id like 'AE0007'
Reply
Answers (
5
)
contact list project
How to add 30 days to date and display color based on date