|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-05-23 16:35 UTC] gpd at gpdnet dot co dot uk
Description:
------------
pdo::execute gives the following message:
Fatal error: Exceptions must be valid objects derived from the Exception base class in c:\Inetpub\wwwroot\phptest\WRTest\wrclient.php on line 196
This seems to be a problem in the PDO ode itself
Turning off PDO_ERRMODE_EXCEPTION gives error (via errorInfo()) of:
[Sybase][ODBC Driver]Invalid cursor state (SQLExecute[0] at ext\pdo_odbc\odbc_stmt.c:132)
But the code fetches the data and otherwise seems to execute OK.
Reproduce code:
---------------
$SQL = 'select * from vclient where client_id = 3196;
$cn = new PDO('odbc:DRIVER={Adaptive Server Anywhere 9.0};ENG=webroster;DBN=cct8740;CommLinks=TCP','dba','sql');
$cn->setAttribute(PDO_ATTR_CASE, PDO_CASE_LOWER);
$cn->setAttribute(PDO_ATTR_ERRMODE, PDO_ERRMODE_EXCEPTION);
$dr = $cn->query($SQL);
$dr->execute();
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 15 17:00:02 2025 UTC |
Well, my test code: $cn = new PDO('odbc:WEBROSTER000','user1.drb2171','user1'); fails with: Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in c:\Inetpub\wwwroot\phptest\dbtest0.php:27 If I try to load php_pdo_odbc, it can't find it. Looking at the latest snapshot build log: odbc_driver.c ext\pdo_odbc\php_pdo_odbc_int.h(32) : fatal error C1083: Cannot open include file: 'sqlcli1.h': No such file or directory And a few more..... Of course, I could be doing something else wrong..