|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-08-24 14:37 UTC] tony2001@php.net
[2006-09-01 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 17:00:01 2025 UTC |
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