ID: 37725 Updated by: [EMAIL PROTECTED] Reported By: nicolas at serpe dot org -Status: Assigned +Status: Feedback Bug Type: PDO related Operating System: Windows XP PHP Version: 5CVS-2006-06-07 (snap) Assigned To: Wez New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip Previous Comments: ------------------------------------------------------------------------ [2006-06-07 10:23:42] nicolas at serpe dot org Description: ------------ The nextRowset() function of PDO, when used with a stored procedure which returns more than 1 result set, crashes PHP with an "Access Violation" error. I encountered this bug with the latest CVS snapshot of PHP, on IIS 5 and Windows XP. The Database is MS SQL Server 2000. Reproduce code: --------------- <?php $conn = new PDO("odbc:Driver={SQL Server};Server=myserver;Database=mydb;Trusted_Connection=yes;"); $sql = 'EXECUTE Test'; $stmt = $conn->query($sql); $i = 1; do { $rowset = $stmt->fetchAll(PDO::FETCH_NUM); if ($rowset) { printResultSet($rowset, $i); } $i++; } while ($stmt->nextRowset()); function printResultSet(&$rowset, $i) { print "<br />Result set $i:<br />"; foreach ($rowset as $row) { foreach ($row as $col) { print $col . "\t"; } print "<br />"; } print "<br />"; } ?> Expected result: ---------------- An output of the 3 result sets. Actual result: -------------- PHP has encountered an Access Violation at 010ABAEC Result set 1: 0 1 2 7 8 9 10 11 12 13 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37725&edit=1