Merge branch 'nextrowset-fix' of https://github.com/david-puglielli/msphpsql into nextrowset-fix
This commit is contained in:
commit
95f76757d0
|
@ -1068,7 +1068,7 @@ int pdo_sqlsrv_stmt_next_rowset( _Inout_ pdo_stmt_t *stmt TSRMLS_DC )
|
||||||
SQLSRV_ASSERT( driver_stmt != NULL, "pdo_sqlsrv_stmt_next_rowset: driver_data object was null" );
|
SQLSRV_ASSERT( driver_stmt != NULL, "pdo_sqlsrv_stmt_next_rowset: driver_data object was null" );
|
||||||
|
|
||||||
// Return the correct error in case the user calls nextRowset() on a null result set.
|
// Return the correct error in case the user calls nextRowset() on a null result set.
|
||||||
// Null means that SQLNumResultCols() returns 0 and SQLRowCount is not return > 0. But first
|
// Null means that SQLNumResultCols() returns 0 and SQLRowCount does not return > 0. But first
|
||||||
// check that the statement has been executed and that we are not past the end of a non-null
|
// check that the statement has been executed and that we are not past the end of a non-null
|
||||||
// result set to make sure the user gets the correct error message. These checks are also
|
// result set to make sure the user gets the correct error message. These checks are also
|
||||||
// done in core_sqlsrv_next_result(), but we cannot check for null results there because that
|
// done in core_sqlsrv_next_result(), but we cannot check for null results there because that
|
||||||
|
|
|
@ -562,7 +562,7 @@ PHP_FUNCTION( sqlsrv_next_result )
|
||||||
try {
|
try {
|
||||||
|
|
||||||
// Return the correct error in case the user calls sqlsrv_next_result() on a null result set.
|
// Return the correct error in case the user calls sqlsrv_next_result() on a null result set.
|
||||||
// Null means that SQLNumResultCols() returns 0 and SQLRowCount is not return > 0. But first
|
// Null means that SQLNumResultCols() returns 0 and SQLRowCount does not return > 0. But first
|
||||||
// check that the statement has been executed and that we are not past the end of a non-null
|
// check that the statement has been executed and that we are not past the end of a non-null
|
||||||
// result set to make sure the user gets the correct error message. These checks are also
|
// result set to make sure the user gets the correct error message. These checks are also
|
||||||
// done in core_sqlsrv_next_result(), but we cannot check for null results there because that
|
// done in core_sqlsrv_next_result(), but we cannot check for null results there because that
|
||||||
|
|
|
@ -7,6 +7,7 @@ Test that calling nextRowset() on an empty result set produces the correct error
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
require_once("MsSetup.inc");
|
require_once("MsSetup.inc");
|
||||||
|
require_once("MsCommon.inc");
|
||||||
|
|
||||||
$conn = new PDO( "sqlsrv:Server = $server; Database = $databaseName; ", $uid, $pwd );
|
$conn = new PDO( "sqlsrv:Server = $server; Database = $databaseName; ", $uid, $pwd );
|
||||||
$conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
|
$conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
|
||||||
|
|
|
@ -7,6 +7,7 @@ Test that calling sqlsrv_next_result() on a null result set produces the correct
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
require_once("MsSetup.inc");
|
require_once("MsSetup.inc");
|
||||||
|
require_once("MsCommon.inc");
|
||||||
|
|
||||||
$conn = sqlsrv_connect($server, array("Database"=>$databaseName, "uid"=>$uid, "pwd"=>$pwd));
|
$conn = sqlsrv_connect($server, array("Database"=>$databaseName, "uid"=>$uid, "pwd"=>$pwd));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue