#42414 [Opn->Fbk]: odbc_columns() function incompatible with Oracle ODBC driver

From: Date: Fri, 24 Aug 2007 13:15:15 +0000
Subject: #42414 [Opn->Fbk]: odbc_columns() function incompatible with Oracle ODBC driver
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-116631@lists.php.net to get a copy of this message
ID: 42414 Updated by: jani@php.net Reported By: jhml at gmx dot net -Status: Open +Status: Feedback Bug Type: ODBC related Operating System: Linux PHP Version: 5.2.3 New Comment: Are you sure it doesn't break the other possible drivers..? Previous Comments: ------------------------------------------------------------------------ [2007-08-24 13:13:42] jhml at gmx dot net Proposed patch: --- php-5.2.3/ext/odbc/php_odbc.c 2007-03-13 01:04:38.000000000 +0100 +++ php-5.2.3-fix_odbc_columns/ext/odbc/php_odbc.c 2007-08-24 14:57:41.000000000 +0200 @@ -2947,6 +2947,11 @@ */ if (table && strlen(table) && schema && !strlen(schema)) schema = NULL; + /* + * Needed to make Oracle happy (Johann Hanne) + */ + if (cat && !strlen(cat)) cat = NULL; + rc = SQLColumns(result->stmt, cat, cat_len, schema, schema_len, ------------------------------------------------------------------------ [2007-08-24 13:11:23] jhml at gmx dot net Description: ------------ The Oracle ODBC driver expects NULL as the second parameter to the SQLColumns() C function, otherwise, it will throw an error. With PHP 5.2.3 it's not possibly to specify NULL, though. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42414&edit=1

« previous php.bugs (#116631) next »