From: [EMAIL PROTECTED] Operating system: Win2000-SP2 + IIS5 PHP version: 4.2.0 PHP Bug Type: ODBC related Bug description: type 'text' fields not retrieved, warning given
When selecting data from a table with ODBC on a SQL2000 database (latest MDAC + SQL Server drivers version 200.80.528.00 + PHP4.20) a warning is given. Warning: SQL error: [Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index, SQL state S1002 in SQLGetData This warning does not appear when using PHP version up to 4.1.0. PHP is configured as a CGI program (ISAPI does not seem to work either!!) The warning appears when using odbc_result(), using both field names and column numbers, example: $conID=odbc_pconnect($dsn,$usr,$pwd); $res=odbc_do($conID,"SELECT Fieldname FROM Table") $var=odbc_result($conID,"Fieldname"); //either this $var=odbc_result($conID,1); //or this is used Further, the data is not retrieved from that field onwards and the data transfer from the server dies. The type of data is the SQL Server type 'text', length is 16. The script has not been modified in any way. We have taken into account the parameter for odbc_longreadlen() As far as we understand it, the error seems to indicate that the requested field cannot be found, even though other applications (MS-Access, SQL-Server) and PHP 4.1.0. don't seem to have this problem. -- Edit bug report at http://bugs.php.net/?id=16756&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=16756&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=16756&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=16756&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=16756&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=16756&r=support Expected behavior: http://bugs.php.net/fix.php?id=16756&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=16756&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=16756&r=submittedtwice