ID:               39345
 Updated by:       [EMAIL PROTECTED]
 Reported By:      frederic dot fanchamps at skynet dot be
-Status:           Open
+Status:           Closed
 Bug Type:         ODBC related
 Operating System: Windows XP
 PHP Version:      5.1.6
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




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

[2006-11-02 19:38:17] frederic dot fanchamps at skynet dot be

I have tried with PHP 5.2.1-dev (cli) (built: Oct 31 2006 08:22:42) and
with this version the problem does not occur.

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

[2006-11-02 16:12:56] frederic dot fanchamps at skynet dot be

Description:
------------
foreach($query as $row), $query coming from PDO, gives PDO exception at
ext\pdo_odbc\odbc_stmt.c:363 after reading the last row


Reproduce code:
---------------
<?php

$d = new PDO('odbc:localdb2', 'frf', 'password');
$d->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
foreach ($d->query('select * from employee') as $row) {
/* some code, or not, does not matter */
}

?>

Expected result:
----------------
no exception in the foreach

Actual result:
--------------
After reading the last row,
PHP Fatal error:  Uncaught exception 'PDOException' with message
'SQLSTATE[]: <<Unknown error>>: 0  (SQLFetchScroll[0] at
ext\pdo_odbc\odbc_stmt.c:363)' in C:\_work\test.php:5
Stack trace:
#0 C:\_work\test.php(5): unknown()
#1 {main}
  thrown in C:\_work\test.php on line 5


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


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

Reply via email to