Invalid operand for operator: =

0 Likes

Problem:

A C# program using ADO.NET to connect to Vision ISAM data through AcuODBC executed the following SQL statement:

SELECT MY_FIRST FROM MEMBER WHERE MEMBER.MY_CLUB=481 AND MEMBER.MY_NUMB='D148687     '

This resulted in the following error:

System.Data.Odbc.OdbcException: ERROR [S0000] [AcuCorp, Inc.][AcuODBC Driver]Invalid operand for operator: =

Resolution:

Although the COBOL FD has both MY_CLUB and MY_NUMB defined as PIC 9(3), they have to be passed as string data types  instead of numeric values from the C# program to avoid the error.

Old KB# 2817
Comment List
Related
Recommended