We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This happens only with SQLSRV in both Linux and Windows as long as there is a column of type varchar(max). Here are the steps to repro:
$conn = sqlsrv_connect($server, array('UID'=>$uid, 'PWD'=>$pwd, 'Database'=>$database)); $stmt = sqlsrv_query($conn, "CREATE TABLE [php_test_table_1] ([c1_int] int, [c2_varchar_max] varchar(max))"); $stmt = sqlsrv_query($conn, "INSERT INTO [php_test_table_1] (c1_int, c2_varchar_max) VALUES (1, 'This is a test')"); $size = 0; $stmt = sqlsrv_prepare($conn, "SELECT * FROM [php_test_table_1]", array(), array("Scrollable"=>"buffered")); sqlsrv_configure('ClientBufferMaxKBSize', $size); $attr = sqlsrv_get_config('ClientBufferMaxKBSize'); echo("ClientBufferMaxKBSize is $attr\n"); sqlsrv_execute($stmt); $rows = sqlsrv_has_rows($stmt); var_dump($rows); $numRows1 = sqlsrv_num_rows($stmt); echo("Number of rows: $numRows1\n"); sqlsrv_execute($stmt); $numRowsFetched = 0; while ($row = sqlsrv_fetch_array($stmt)) $numRowsFetched++; echo("Number of rows fetched: $numRowsFetched\n");
If I change the column type to varchar(20) the problem is gone.
Actual output:
ClientBufferMaxKBSize is 0 bool(true) Number of rows: 1 Number of rows fetched: 1
Expected output:
ClientBufferMaxKBSize is 0 bool(false) Number of rows: 0 Number of rows fetched: 0
The text was updated successfully, but these errors were encountered:
Fixed by PR #254.
Sorry, something went wrong.
v-dareck
No branches or pull requests
This happens only with SQLSRV in both Linux and Windows as long as there is a column of type varchar(max). Here are the steps to repro:
If I change the column type to varchar(20) the problem is gone.
Actual output:
Expected output:
The text was updated successfully, but these errors were encountered: