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
raluca mindrut
NA
8
3.9k
c# database HELP
Mar 11 2014 1:02 PM
I am getting this error: "data type mismatch in criteria expression" Can you tell me why?
here's the code
try
{
string constring = @"Provider = Microsoft.ACE.OLEDB.12.0; Data source= bla.accdb;Persist Security Info=True;";
OleDbConnection conexiune = new OleDbConnection(constring);
OleDbCommand cmdDataBase = new OleDbCommand("Select * from Table1 where nume =' " + this.textBox1.Text+"' and parola ='"+this.textBox2.Text+"';", conexiune);
OleDbDataReader myReader;
conexiune.Open();
myReader = cmdDataBase.ExecuteReader();
int count = 0;
while (myReader.Read())
{ count = count + 1; }
if (count == 1)
{
MessageBox.Show("FS");
}
else
{
MessageBox.Show("no");
}
}
catch (Exception ex)
{ MessageBox.Show(ex.Message); }
}
Reply
Answers (
3
)
Second Timer should start after first timer count to zero.
c# database login