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
VINAY KUMAR
1.6k
92
63.2k
: Data type mismatch in criteria expression
Feb 25 2017 10:11 AM
when iam select id in dropownlist iwant to display stuentname in textbox...
when iam use below code it shos error like.....
System.Data.OleDb.OleDbException: Data type mismatch in criteria expression.
string value2 = ddcoursej.SelectedItem.Text;
string value1 = txtseach.Text;
OleDbConnection con = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\\TecbuzzDb\\techdb.accdb");
con.Open();
OleDbCommand cmd = new OleDbCommand("select ID ,Student_name, Mobile from stuentregistration WHERE ID='" + value2 + "'", con);
OleDbDataAdapter da = new OleDbDataAdapter(cmd);
// DataSet ds = new DataSet();
DataTable DT = new DataTable();
da.Fill(DT);
txtname10.Text= DT.Rows[0]["Student_name"].ToString();
Reply
Answers (
1
)
How To change value in sql server Programaticlly in c#
loops it is for the for loops