What the cause of this error message?
After debug, it point me at this line
Quote:
InfoRS4.Open "Select * from [Prestasi hasil] where Plot = " & getID, conn, adOpenDynamic, adLockOptimistic
Printable View
What the cause of this error message?
After debug, it point me at this line
Quote:
InfoRS4.Open "Select * from [Prestasi hasil] where Plot = " & getID, conn, adOpenDynamic, adLockOptimistic
Just like in VB code, the error "Data type mismatch" in SQL statements means that you are trying to put a value of one data type (eg: String/Date/Integer/...) into something which has a different data type - but the value cannot fit into the other data type.
Check what data type the "Plot" field is in that table, and then make sure that you have specified the value appropriately - as shown in the article How do I use values (numbers, strings, dates) in SQL statements? from our Database Development FAQs/Tutorials (at the top of this forum)