Thread: Data type mismatch blues.
02-24-04, 04:24 #1Registered User
- Join Date
- Feb 2004
Unanswered: Data type mismatch blues.
We have an old DOS program that is still in use daily. I am trying to use the existing dBase database (not sure what version) and write a more user friendly interface in vb6. I have used and ADO control and am connecting through ODBC. I can populate the datagrid control without a problem, but when I try try:
Adodc2.RecordSource = "SELECT * FROM Supplier WHERE JOB_NO = '" & JobNumber & " '"
I get a data type mismatch for the JobNumber. The job number would typically be 1394.02 for example. I have tried declaring it as an Integer, String, long, short and double. I keep getting the same error:
[Microsoft][ODBC dBase driver] data type mismatch in criteria expression.
I have been trying to sort this out for the last six hours. Can anyone help?
02-24-04, 08:32 #2Registered User
- Join Date
- Jan 2004
Re: Data type mismatch blues.
I am not familiar with dBase but is the syntax the same as SQL? (i.e. does it use single quotations around the value as you are using?
Instead of ADODC try this control insteadIn abundance of water only the fool is thirsty. Bob Marley.