Bug #54343 [Opn->Nab]: odbc_execute - Driver does not support this function

From: Date: Sat, 11 Apr 2015 14:53:56 +0000
Subject: Bug #54343 [Opn->Nab]: odbc_execute - Driver does not support this function
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-191967@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=54343&edit=1

 ID:                 54343
 Updated by:         cmb@php.net
 Reported by:        aw at limbas dot de
 Summary:            odbc_execute - Driver does not support this function
-Status:             Open
+Status:             Not a bug
 Type:               Bug
 Package:            ODBC related
 Operating System:   linux reh5
 PHP Version:        5.3.6
-Assigned To:        
+Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

Indeed, the behavior is not a bug in current versions of PHP, but
rather an old bug had been fixed, as explained by braydenm
(thanks!).


Previous Comments:
------------------------------------------------------------------------
[2014-06-14 18:11:26] braydenm at povs dot net

I experienced this issue too (with 5.4.29), but the issue will occur with anything newer than 5.3.3.

The root problem's not actually caused by PHP, which threw me because it appeared to work
perfectly fine in 5.3.3.

The issue being experienced here is because error handling was added to SQLDescribeParam()
(https://github.com/php/php-src/commit/e6bef6735f44c6a44ca3dd633a0a93e9abcdf38f#diff-e7dfa5ff1b47832265dcb9426b0af690R1296);
previously none existed, so it assumed all was fine, but in reality, it was still throwing this
error. It was just ignored, and somehow managed to continue behaving relatively normally.

In my case, it's rightfully throwing this error because in fact FreeTDS does not support
SQLDescribeParam().

------------------------------------------------------------------------
[2011-03-22 10:54:10] aw at limbas dot de

Description:
------------
since php 5.3.5 odbc_execute failed
up to php 5.3.3 it works fine (with same conditions, same database and same odbc-drivers)

Resource id #15
faultCode0faultStringWarning:odbc_execute(): SQL error: [unixODBC][Driver Manager]Driver does not
support this function, SQL state IM001 in SQLDescribeParameter

We use 
postgresql 9.0.3, 
psqlODBC 08.03.0200-12.1,
UnixODBC 2.2.12-206.1



Test script:
---------------
$sql_prep = odbc_prepare($db, 'update testtab set testfield = ? where id = 1');
echo $sql_prep;
$rs = odbc_execute($sql_prep, array("dideldidum"));



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=54343&edit=1


Thread (3 messages)

« previous php.bugs (#191967) next »