Saving data in ms access database from software on 32-bit platform runs perfectly well..But when I try to save data using same software on 64-bit application throws below error:
**System.Runtime.InteropServices.ComException. Datatype mismatch in criteria expresssion. **
I have declared some variables as SHORT in my application and in database those fields are defined as Long Integer or Integer..
Eg. WardNo variable in software is defined as SHORT and in ms Access database,WardNo is stored As Integer..
On 32-bit,it doesnt show any error,but on 64-bit machine,error occurs..Please help me to solve this...

You can try to force the software to use 32 bit datatypes with a statement like this.

Try
    '...Your Code.
    Dim shortVal As Short 'Replace this with your short variable.
    Dim i32Converted As Int32 = Convert.ToInt32(shortVal) 'Commit the 32bit value to the database.
    '...Your Code to update database.
Catch ex As Exception
    MsgBox(ex.toString)
End Try
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.