Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
In Mono 2.11.4 (and other versions), SqlDataReader::ExecuteReader() is not working in the same way as Microsoft.NET.
--- Example ---
SqlConnection myConnection = new SqlConnection("user id=<user>;password=<pw>;server=<host>,<port>;database=<db>");
myCommand = new SqlCommand("BEGIN TRANSACTION", myConnection);
// BUG: Doesn't work on Mono, but works on Microsoft.NET
reader = myCommand.ExecuteReader();
// OK: Works fine on Mono and Microsoft.NET
The same occurs for other NonQuery commands like "SET IDENTITY_INSERT <table> ON".
This is breaking MSSQL Support on Phalanger (see: https://github.com/DEVSENSE/Phalanger/issues/29)
I forgot to mention that using ExecuteReader() instead of ExecuteNonQuery() for the command "BEGIN TRANSACTION" generates the following error with Mono (not with MS.NET):
Command execution failed: Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 0, current count = 1.
Mono 5.10 has significantly improved System.Data implementation which should resolve this issue. If you can still reproduce it please reopen the issue.