--TEST-- Cursor Mode Test --DESCRIPTION-- Verifies the functionality associated with scrollable resultsets. --ENV-- PHPT_EXEC=true --SKIPIF-- --FILE-- $cursor); $stmt2 = sqlsrv_query($conn, $query, null, $options); if (!sqlsrv_has_rows($stmt2)) { die("Table $tableName is not expected to be empty..."); } if (($cursor == SQLSRV_CURSOR_STATIC) || ($cursor == SQLSRV_CURSOR_KEYSET)) { $numRows = sqlsrv_num_rows($stmt2); if ($numRows != $noRows) { die("Unexpected row count for $cursor: $numRows instead of $noRows\n"); } } while (($noRows > 0) && sqlsrv_fetch($stmt2)) { // consume the result set $noRows--; } if ($noRows2 > 0) { $extraRows = AE\insertTestRows($conn, $tableName, $noRows2); if ($cursor == SQLSRV_CURSOR_DYNAMIC) { $noRows += $extraRows; } } while (sqlsrv_fetch($stmt2)) { // consume the result set $noRows--; } sqlsrv_free_stmt($stmt2); if ($noRows != 0) { die("Unexpected row count for $cursor: $noRows\n"); } dropTable($conn, $tableName); } try { cursorTest(10, 5); } catch (Exception $e) { echo $e->getMessage(); } ?> --EXPECT-- Test "Statement - Cursor Mode" completed successfully.