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!

We have a program in C++ Builder wh

Status
Not open for further replies.

tazforcenz

IS-IT--Management
Feb 28, 2002
7
0
0
NZ
We have 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 on our development Windows 2000 machine. Is this an ODBC driver issue or something else? All machines have Access 2000 installed.

qry = AnsiString(" SELECT ParameterName") + periods +
AnsiString(" FROM TempTable ") +
AnsiString(" WHERE DivisionID = :1 ") +
AnsiString(" AND MachineGroupID IN (SELECT GroupID FROM Groups WHERE DivisionID = :2 AND GroupName = :3 ) ") +
AnsiString(" AND Show = true GROUP BY ParameterName ");
MachineParametersQuery1->SQL->Clear();
MachineParametersQuery1->SQL->Add(qry);
MachineParametersQuery1->Params->Items[0]->Value = mDivisionID;
MachineParametersQuery1->Params->Items[1]->Value = mDivisionID;
MachineParametersQuery1->Params->Items[2]->Value = mMachineGroupName;

Need some advice. Thanks.
 
I think you should have a look on the sql-Command immidiately before it is executed.

If it is ok. it may be a Problem of the ODBC Driver.


hnd
hasso55@yahoo.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top