ID: 16756 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: ODBC related Operating System: Win2000-SP2 + IIS5 PHP Version: 4.2.0 New Comment:
Type TEXT is not a valid ODBC type with ODBC v2.0 systems (which PHP is). There is work currently underway to enable support for the recent ODBC release (which includes ODBC v3.7 and TEXT support), but at this time it's not generally available. None the less some of the errors you are seeing have been fixed in 4.2.1 (I believe). Please try that for the other errors you were seeing, and see if that fixes them. Sorry about that, but I made a bad change and no one tested it. Previous Comments: ------------------------------------------------------------------------ [2002-04-23 11:14:57] [EMAIL PROTECTED] 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 this bug report at http://bugs.php.net/?id=16756&edit=1
