ID:               34852
 Updated by:       [EMAIL PROTECTED]
 Reported By:      tim dot tassonis at trivadis dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         ODBC related
 Operating System: Linux
 PHP Version:      5.0.5
 New Comment:

>I can provide a patch to fix it, if that's appreciated.
Of course it is.


Previous Comments:
------------------------------------------------------------------------

[2005-10-13 12:14:49] tim dot tassonis at trivadis dot com

Description:
------------
When using the oracle-supplied ODBC Driver under Linux, any odbc_exec()
call fails with:
[unixODBC][Driver Manager]Driver does not support this function

The log files is a bit more verbose:
[unixODBC][Driver Manager]Driver does not support this function, SQL
state IM001 in  SQLSetStmtOption

The offending code is in odbc_prepare(line 875) and odbc_exec (line
1276), when the module tries to set SQL_CURSOR_DYNAMIC via
SQLSetStmtOption, which returns an error using the oracle driver.
The error goes away if I undefine HAVE_SQL_EXTENDED_FETCH, so the
statements will not be reached.
Would it be possible to only issue a notice when this command fails and
proceed with processing.
I can provide a patch to fix it, if that's appreciated.


Reproduce code:
---------------
$dsn="ANY_ORACLE_DSN";
$uid="ANY_VALID_USERID";
$pwd="ANY_VALID_PASSWORD";
$conn = odbc_connect ( $dsn, $uid, $pwd );
/* The connect succeeds */
if (!$conn) {
  printf("Error connecting to $database.<br>\n");
  return;
}
/* The exec will fail with the decribed error */
$cursor    = odbc_exec($conn,"SELECT tname from tab");
if (!$cursor) {
  printf("Failure in odbc_exe:<br>\n");
  printf("%s<br>\n",htmlentities(odbc_errormsg($conn)));
  return;
}


Actual result:
--------------
[unixODBC][Driver Manager]Driver does not support this function, SQL
state IM001 in  SQLSetStmtOption



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


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

Reply via email to