[Mono-bugs] [Bug 75052][Nor] New - SqlCommand.Execute throws
exception when the name of ReturnValue parameter does not
begin with @
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Thu May 26 05:33:43 EDT 2005
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by kornelpal at hotmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=75052
--- shadow/75052 2005-05-26 05:33:43.000000000 -0400
+++ shadow/75052.tmp.7016 2005-05-26 05:33:43.000000000 -0400
@@ -0,0 +1,33 @@
+Bug#: 75052
+Product: Mono: Class Libraries
+Version: unspecified
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Sys.Data.SqlClient
+AssignedTo: rodrigo at novell.com
+ReportedBy: kornelpal at hotmail.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: SqlCommand.Execute throws exception when the name of ReturnValue parameter does not begin with @
+
+Code to reproduse the bug:
+SqlCommand command = connection.CreateCommand();
+SqlParameterCollection parameters = command.Parameters;
+SqlParameter parameter = parameters.Add("Return", SqlDbType.Int);
+parameter.Direction = ParameterDirection.ReturnValue;
+command.ExecuteNonQuery();
+
+Throws SqlException.
+
+.NET Framework accepts it.
+
+This can be worked around using "@Return" instead of "Return".
+
+All the example code in .NET Framework SDK uses "Return" as the return
+value paramter name so I think this is widely used.
More information about the mono-bugs
mailing list