Hi<div><br></div><div>Currently attempting the to use a bind parameter on RHEL x86_64 talking to TimesTen 7.0.5 x86_64 using PHP 5.2.6 and SQLrelay 39.4.</div><div><br></div><div>php --&gt; sqlrelay -- ODBC -&gt; Times Ten.</div>
<div><br></div><div>The unixODBC (2.2.11) odbc.ini as follows:</div><div><br></div><div><div>[CUSTACC_CACHE]</div><div>Driver=/var/oracle/TimesTen/tt70/lib/libtten.so</div><div>DataStore=/var/oracle/TimesTen/tt70/info/CACC/CACC</div>
<div>DatabaseCharacterSet=WE8ISO8859P1</div><div>ConnectionCharacterSet=WE8ISO8859P1</div><div>Authenticate=0</div><div><br></div><div><br></div><div>With ODBC tracing on we receive this error:</div><div><br></div><div><div>
[ODBC][21083][SQLPrepareW.c][300]</div><div>                Exit:[SQL_SUCCESS]</div><div>[ODBC][21083][SQLBindParameter.c][193]</div><div>                Entry:            </div><div>                        Statement = 0x1d031740            </div>
<div>                        Param Number = 0            </div><div>                        Param Type = 1            </div><div>                        C Type = -8 SQL_C_WCHAR            </div><div>                        SQL Type = 1 SQL_CHAR            </div>
<div>                        Col Def = 0            </div><div>                        Scale = 0            </div><div>                        Rgb Value = 0x1d19f360            </div><div>                        Value Max = 10            </div>
<div>                        StrLen Or Ind = (nil)</div><div>[ODBC][21083][SQLBindParameter.c][204]Error: 07009</div><div>[ODBC][21083][SQLError.c][342]</div><div>                Entry:                </div><div>                        Statement = 0x1d031740                </div>
<div>                        SQLState = 0x7fff8d66a170                </div><div>                        Native = 0x7fff8d66a188                </div><div>                        Message Text = 0x7fff8d669f70                </div>
<div>                        Buffer Length = 500                </div><div>                        Text Len Ptr = 0x7fff8d66a18e</div><div>[ODBC][21083][SQLError.c][379]</div><div>                Exit:[SQL_SUCCESS]                    </div>
<div>                        SQLState = 07009                    </div><div>                        Native = 0x7fff8d66a188 -&gt; 0                    </div><div>                        Message Text = [[unixODBC][Driver Manager]Invalid parameter index]</div>
<div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div>This issue has left me a little stumped, any help would be appreciated.</div><div><br></div><div><br></div><div><br></div><div><br></div><div>
Below is the PHP code I use to attempt the bind:</div><div><br></div><div><br></div><div><br></div><div><div>&lt;?php</div><div>echo &quot;Connecting to SQLRelay\r\n&quot;;</div><div>        $con=sqlrcon_alloc(&quot;192.168.163.247&quot;,9000,&quot;&quot;,&quot;user1&quot;,&quot;password1&quot;,0,1) or die(&quot;Cannot Connect\r\n&quot;);</div>
<div>echo &quot;Connected\r\n&quot;;</div><div>        $cur=sqlrcur_alloc($con);</div><div>        sqlrcur_prepareQuery($cur,&quot;select rs_id, rs_group from qlog.resources where rs_id = :resourceid&quot;);</div><div>        sqlrcur_inputBind($cur,&quot;resourceid&quot;,&#39;99903&#39;);</div>
<div>#       sqlrcur_validateBinds($cur) or die(&quot;binds are invalid - &quot;.sqlrcur_errorMessage($cur));</div><div>        echo &quot;Executing Query\r\n&quot;;</div><div>        sqlrcur_executeQuery($cur) or die (&quot;Query Failed - &quot;.sqlrcur_errorMessage($cur).&quot;\r\n&quot;);</div>
<div>        for ($row=0; $row&lt;sqlrcur_rowCount($cur); $row++) {</div><div>                     for ($col=0; $col&lt;sqlrcur_colCount($cur); $col++) {</div><div>                             echo sqlrcur_getField($cur,$row,$col);</div>
<div>                             echo &quot;,&quot;;</div><div>                     }</div><div>                     echo &quot;\n&quot;;</div><div>        }</div><div><br></div><div>print_r($cur);</div><div><br></div><div>
sqlrcur_free($cur);</div><div>sqlrcon_free($con);</div><div>?&gt;</div><div>~                 </div></div><div><br></div><div><br></div></div></div>