Bug #73191 [Opn]: "SQLColAttribute can't handle SQL_DESC_OCTET_LENGTH" with Foxpro

From: Date: Wed, 28 Sep 2016 16:00:04 +0000
Subject: Bug #73191 [Opn]: "SQLColAttribute can't handle SQL_DESC_OCTET_LENGTH" with Foxpro
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-204325@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73191&edit=1 ID: 73191 Updated by: cmb@php.net Reported by: eion at robbmob dot com Summary: "SQLColAttribute can't handle SQL_DESC_OCTET_LENGTH" with Foxpro Status: Open Type: Bug Package: ODBC related Operating System: Windows PHP Version: 7.0.11 -Assigned To: +Assigned To: ab Block user comment: N Private report: N New Comment: That appears to be a bug in the Microsoft ODBC Visual FoxPro driver (BTW, which version do you use?) Apparently, the driver claims ODBC 3.0 compatibility, but doesn't know about SQL_DESC_OCTET_LENGTH. Not sure if we should do something here, besides reporting the issue to Microsoft. Anatol, what do you think? Previous Comments: ------------------------------------------------------------------------ [2016-09-28 06:43:06] eion at robbmob dot com Description: ------------ Every query with odbc_exec() that returns a string is outputting a PHP Warning of "SQLColAttribute can't handle SQL_DESC_OCTET_LENGTH" when using the Foxpro driver. The full error is [28-Sep-2016 19:15:10 Pacific/Auckland] PHP Warning: odbc_exec(): SQLColAttribute can't handle SQL_DESC_OCTET_LENGTH: [S1091] [Microsoft][ODBC Visual FoxPro Driver]Descriptor type out of range in test.php on line 2 Looking at https://github.com/php/php-src/blob/master/ext/odbc/php_odbc.c#L1018 php_error_docref(NULL, E_WARNING, "SQLColAttribute can't handle SQL_DESC_OCTET_LENGTH: [%s] %s", state, errtxt); It appears that this warning should actually be a notice, or have some way of blocking this message. This warning was added in http://git.php.net/?p=php-src.git;a=commit;h=268eb1999b1598a2a1a875c5f0172d5b615811ac Test script: --------------- <?php $a = odbc_connect('Foxpro', '', ''); odbc_exec($a, "SELECT foo FROM bar"); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73191&edit=1

« previous php.bugs (#204325) next »