hi Developers ,
when i retrive datas from database i got the following error.
OleDb Exception Was Unhandled
Data type mismatch in criteria expression. (Using Ms Access db)
i don't know what is wrong with my code.below am adding my using code
string str = "select AttendanceLogs.*,Shifts.EndTime,Shifts.BeginTime,Shifts.Break1,Shifts.Break1BeginTime,Break1EndTime from AttendanceLogs inner join Shifts on Shifts.ShiftId = AttendanceLogs.ShiftId where AttendanceDate between '" + sDate + "' AND '" +tDate + "' and EmployeeId ='" + edr.GetValue(0) + "'";
OleDbCommand getLogs = new OleDbCommand(str, Conn);
OleDbDataReader dr = getLogs.ExecuteReader();
so please suggest me if i done any wron in my code.
thanks with
Paul.S


Manas MohapatraRank #182 · 13.2K reputationPosted May 3, 2017, 1:53 AM EDT
Rafnas T PRank #280 · 8.8K reputationPosted May 3, 2017, 1:03 AM EDT
Paul RajsRank #2,423 · 582 reputationPosted May 3, 2017, 2:52 AM EDT