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... */

    2 months later

    Someone else had this problem recently where changing the JOIN from the old style (using filter criteria in the WHERE clause) to the new style (JOIN ... ON ...) fixed the problem.

    Hope this helps, looks like changing the order your fields are called in also might help according to the other references I've seen on the web.

    Good Luck,
    Jeff

      Write a Reply...