Link to home
Start Free TrialLog in
Avatar of rito1
rito1

asked on

Date Parameter - System.Data.OleDb.OleDbException: Data type mismatch in criteria expression.

Hi All,

I am working on an ASP.NET website which uses MS Access as a database.

I am trying to pass a date parameter into an Access query but get the following error when executing the OleDbCommand:

System.Data.OleDb.OleDbException: Data type mismatch in criteria expression.

I have double checked that my parameter is formatted as a date using the DateTime data type within ASP.NET.

Is there something else I should know about MS Access date formats which could be causing this issue?

Thanks,

Rit
SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rito1
rito1

ASKER

I got sorted... I needed to use the DateTime.ToOADate Method for MNS Access.

thanks,

Rich