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
I try to use sqlexp.Messages as it's implemented in #690
sqlexp.Messages
I created a test procedure and run it in docker image mcr.microsoft.com/azure-sql-edge:latest
mcr.microsoft.com/azure-sql-edge:latest
CREATE OR ALTER PROCEDURE procedureWithPrint AS BEGIN PRINT N'1'; PRINT N'2'; SELECT * from example WHERE id > 7 ORDER BY ID desc; PRINT N'3'; END;
Using an example code in https://github.com/microsoft/go-mssqldb/blob/main/messages_example_test.go#L69 I get only two first prints, since after the SELECT, NextResultSet returns false
SELECT
NextResultSet
false
If I remove active = rows.NextResultSet() (so active is always true) I get message with 3, but the loop does not break.
active = rows.NextResultSet()
active
true
3
When procedure contains no selects:
CREATE OR ALTER PROCEDURE procedureWithPrint AS BEGIN PRINT N'1'; PRINT N'2'; PRINT N'3'; END;
I get all three messages
Am I doing it wrong? What is correct way to get all three messages AND select results AND make the loop to stop?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I try to use
sqlexp.Messages
as it's implemented in #690I created a test procedure and run it in docker image
mcr.microsoft.com/azure-sql-edge:latest
Using an example code in https://github.com/microsoft/go-mssqldb/blob/main/messages_example_test.go#L69 I get only two first prints, since after the
SELECT
,NextResultSet
returnsfalse
If I remove
active = rows.NextResultSet()
(soactive
is alwaystrue
) I get message with3
, but the loop does not break.When procedure contains no selects:
I get all three messages
Am I doing it wrong? What is correct way to get all three messages AND select results AND make the loop to stop?
The text was updated successfully, but these errors were encountered: