Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Type mismatch error on some machines

Status
Not open for further replies.

tazforcenz

IS-IT--Management
Feb 28, 2002
7
0
0
NZ
I have written a program in C++ Builder which connects to an Access 2000 database through ODBC and uses the SQL statement below. I get an error "General SQL error. [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression" when this statement is run on the client's Windows 95/98 machine. This error doesn't appear and the query works fine on a Windows ME/2000/XP machine. Is this an ODBC driver issue or something else? All machines have Access 2000 installed.

SELECT ParameterName, SUM([a03/01/2002]), SUM([a04/01/2002])
FROM TempTable
WHERE DivisionID = 7
AND MachineGroupID IN (SELECT GroupID FROM Groups WHERE DivisionID = 7 AND GroupName = "flexo")
AND Show = true GROUP BY ParameterName

Need some advice. Thanks.
 
I have a similar problem not solved jet. But maybe you should use single quotes (') in the where criteria instead of double quotes (")
 
Try removing quotations(single or double, doesn't matter). I removed quotations, it worked. Somehow Access doesn't like quotations in the SQL strings
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top