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 [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=76467 --- shadow/76467 2005-10-18 07:52:28.000000000 -0400 +++ shadow/76467.tmp.30916 2005-10-18 07:52:28.000000000 -0400 @@ -0,0 +1,56 @@ +Bug#: 76467 +Product: Mono: Class Libraries +Version: 1.1 +OS: +OS Details: Windows XP SP2 +Status: NEW +Resolution: +Severity: +Priority: Wishlist +Component: Sys.Data.SqlClient +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: Decimal parameter of SqlCommand causes exception when executing. + +Description of Problem: + +Mono 1.1.9.2. Windows XP SP2. Assembly was compiled by Visual Studio 2003. + +Add some decimal parameter to SqlCommand and try to call ExecuteNonQuery. +You'll get an exception. + +Steps to reproduce the problem: +1. Create valid SqlCommand instance. +2. Set CommandText property to (for example) "Update [Order] set [EMAIL PROTECTED]" +Add new SqlParameter to the command with decimal value. For example: + + SqlParameter p = new SqlParameter("@P1", new decimal(3.1416)); + // next four lines has no affect + p.Scale = 4; + p.Precision = 8; + p.SqlDbType = SqlDbType.Decimal; + p.Size = 13; + cmd.Parameters.Add(p); + +3. Call ExecuteNonQuery() method of command. + +Actual Results: + +Unhandled Exception: System.Data.SqlClient.SqlException: Must pass +parameter number 4 and subsequent parameters as '@name = value'. After the +form '@name = value' has been used, all subsequent parameters must be +passed in the form '@name = value'. + +Expected Results: Column values in the table are updated. + +How often does this happen? +Always. + +Additional Information: +With MS .NET Framework 1.1 adding decimal value works fine without +specifying precision, scale, DbType and size. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
