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
vinod jangir
NA
114
9.2k
i get data from database
Sep 28 2015 3:27 AM
try
{
if (comboBox1.SelectedIndex >= 0)
{
if (con.State == ConnectionState.Closed)
con.Open();
da = new SqlDataAdapter("select Student_Name, Father_Name from Admission where Admission_ID '" + comboBox1.SelectedValue + " '", con);
dt = new DataTable();
DataTable studentdatabase = new DataTable();
da.Fill(studentdatabase);
dataGridView1.DataSource = new BindingSource(studentdatabase, null);
con.Close();
}
else
{
MessageBox.Show("Select an Batch No");
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
but following error
Incorrect syntax near 'hghgh '.
hghgh is my Admission_ID.
Reply
Answers (
5
)
send sms to mobile
take a snapshort of div tage from id