| || |
Data Binding in a dclsql declaration - ODBC
I am encountering an ODBC error that I believe is due to a problem in my approac to "Data Binding" in my dclsql statement.
I have ODBC calls that return object ID's that need to be used in subsequent ODBC calls. I am using a global variable of string type to capture the data using OdbcGetString(...) and have verified that I am indeed catching the correct data. Here is how I coded the dclsql:
WHERE ent_id = :_ent_ID
AND ent_bank_code = '29';
where '_ent_ID' is the global (string) var.
When running the script I get the following error:
OdbcExecDirect(ODBC: 5 - ODBC error, 42000 (170) : [Microsoft][ODBC SQL Server Driver][SQL Server]Line 3: Incorrect syntax near ':'.)
Any ideas what I am doing wrong here? It looks like the 'variable' _ent_ID is being interpreted as a literal??
Any help would be great.
- Matt Love
Re: Data Binding in a dclsql declaration - ODBC
You have to use ::_ent_ID