Skip to content
Advertisement

MS access Data type mismatch in criteria expression c#

I have error, i want to do a filter, which consist some combobox and datetimepicker and it’s will be show in dategridview. And when i want select date from datebase, i have this error:

“Data type mismatch in criteria expression”.

Advertisement

Answer

Better:

If that doesn’t work, then please tell us what the values for param1, param2, date1, and date2 are when they enter the method. “Select * from GGG where device_id LIKE ‘%” + metroComboBox1.Text + “%’ AND parameter_id LIKE ‘%” + metroComboBox3.Text + “%’ AND time_id Between #”+date1+”# AND #”+date2+”#”;

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement