I have an error "ERROR [22018] [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression". I am using VBdotNet2005 and MS Access as its database, and I can't really get the hang of this error. I've been trying to google the answer but I cannot find solution for this. What is the possible reason why this error raises? Thanks in advance... If you want me to provide my code, pls tell me. I'm new here in daniweb.com :)
aerohn
0
Newbie Poster
Recommended Answers
Jump to PostData type mismatches mostly happens if you try to fill your dataset field with a value that is not of the type as in your database. In example you try to fill an image field into a Integer field.
So please post the table definition and the query you use …
Jump to PostYour error lays in this line:
Dim ActualRole As String = libDS.Tables(0).Rows(0)("tblRoles").ToString
You are trying to get the value from column "tblRoles". I have my doubts that you have named the column the same as the tablename. So please check what name the column, that holds the …
All 8 Replies
GeekByChoiCe
152
Practically a Master Poster
Featured Poster
aerohn
0
Newbie Poster
GeekByChoiCe
152
Practically a Master Poster
Featured Poster
aerohn
commented:
thanks for scanning this code...
+0
aerohn
0
Newbie Poster
GeekByChoiCe
152
Practically a Master Poster
Featured Poster
aerohn
0
Newbie Poster
GeekByChoiCe
152
Practically a Master Poster
Featured Poster
aerohn
0
Newbie Poster
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.