[Sqlrelay-discussion] sqlrcur_inputBind not updating ODBC Param Number
Brought to you by:
mused
|
From: jim w. <jim...@gm...> - 2009-02-26 14:34:08
|
Hi
We are using sqlrelay 39.4 on RHEL5.2 x86_64 Linux to connect to TimesTen
7.0.5 via unixODBC(2.2.11) on same system.
The language we are using is PHP.
When sqlrcur_inputBind is called:
sqlrcur_prepareQuery($cur,"select rs_id, rs_group from
qlog.resources where rs_id = :resourceid");
sqlrcur_inputBind($cur,"resourceid",'99903');
The odbc trace file shows:
[ODBC][21083][SQLBindParameter.c][193]
Entry:
Statement = 0x1d031740
Param Number = 0
Param Type = 1
C Type = -8 SQL_C_WCHAR
SQL Type = 1 SQL_CHAR
Col Def = 0
Scale = 0
Rgb Value = 0x1d19f360
Value Max = 10
StrLen Or Ind = (nil)
[ODBC][21083][SQLBindParameter.c][204]Error: 07009
Since the Param Number = 0, and invalid parameter index is thrown.
When we change the php to call:
sqlrcur_prepareQuery($cur,"select rs_id, rs_group from
qlog.resources where rs_id = :resourceid");
sqlrcur_inputBind($cur,"1",'99903');
Where the sqlrcur_inputBind parameter is now the integer 1, the ODBC trace
shows Para Number = 1 and the query is processed by TimesTen.
Is this an error or bug that you may be aware of ? We have changed the php
calls but would like some clarification.
SQLRelay is used in other parts of the organisation and has proven to be a
reliable and excellent tool (so thanks for that).
Jim
|