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
Tested in Windows, 32bit and 64bit, both NTS. First, create a simple stored procedure like this
create proc test_out @p1 integer, @p2 integer, @p3 integer output as begin select @p3 = @p1 + @p2 print @p3 end go
Then, in the script, set warnings return as errors then initialize the output param to a non-integer as shown below:
sqlsrv_configure( 'WarningsReturnAsErrors', true ); $v1 = 1; $v2 = 2; $v3 = 'str'; $stmt = sqlsrv_query( $conn, "{call test_out( ?, ?, ? )}", array( $v1, $v2, array( &$v3, SQLSRV_PARAM_OUT ))); echo "Output: $v3\n";
The output is Output: 3 followed by lots of garbage.
Output: 3
To fix this issue, simply do the following: sqlsrv_configure( 'WarningsReturnAsErrors', false );
sqlsrv_configure( 'WarningsReturnAsErrors', false );
Then we will get Output: 3, as expected.
The text was updated successfully, but these errors were encountered:
fixed issue microsoft#378
c5af000
Merge pull request #381 from Hadis-Fard/dev
ce63377
issue #378
Fixed in in PR #381
Sorry, something went wrong.
Hadis-Knj
No branches or pull requests
Tested in Windows, 32bit and 64bit, both NTS.
First, create a simple stored procedure like this
Then, in the script, set warnings return as errors then initialize the output param to a non-integer as shown below:
The output is
Output: 3
followed by lots of garbage.To fix this issue, simply do the following:
sqlsrv_configure( 'WarningsReturnAsErrors', false );
Then we will get
Output: 3
, as expected.The text was updated successfully, but these errors were encountered: