ODBC text data type problem

admin

Administrator
Staff member
Hi guys
I have problem with retriving text columns from MS SQL 7 via ODBC. I am using WIN NT, php 4.04 and I cannot switch back to mssql functions and need use only odbc.
Please help.
This is my code:
$cur=odbc_exec($conn,"myProcedure $id");
if(!$cur) {
/* error handler */
}

odbc_binmode($cur, ODBC_BINMODE_PASSTHRU);
odbc_longreadlen($cur, 24568); /* Allow 24kb thru */

while(odbc_fetch_row($cur)){
$longTextField = odbc_result($cur,1);
/* this line give me this error:

SQL error: [Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index, SQL state S1002 in SQLGetData in... */
 
Back
Top