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=82170 --- shadow/82170 2007-07-24 02:07:55.000000000 -0400 +++ shadow/82170.tmp.2466 2007-07-24 02:08:34.000000000 -0400 @@ -1,14 +1,14 @@ Bug#: 82170 Product: Mono: Class Libraries Version: 1.2 -OS: +OS: unknown OS Details: Status: NEW Resolution: -Severity: +Severity: Unknown Priority: Normal Component: Sys.Data.SqlClient AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] QAContact: [EMAIL PROTECTED] TargetMilestone: --- @@ -35,6 +35,55 @@ How often does this happen? Always Additional Information: http://lists.ximian.com/pipermail/mono-list/2007-June/035318.html + +------- Additional Comments From [EMAIL PROTECTED] 2007-07-24 02:08 ------- +Here is what I have here. + +UglyQuickAndDirty code : + +using System; +using System.Data; +using System.Data.SqlClient; + +namespace SqlServerTest +{ + class MainClass + { + public static void Main(string[] args) + { + string longstring = new String('x',20480); + SqlConnection sc = new SqlConnection(@"Server=<a server>; +DataBase=<a db>; User ID=<sql server login>; Password=<sql server +password>;"); + SqlCommand cmd; + SqlParameter prm; + sc.Open(); + + cmd.CommandText = "INSERT INTO Table1(ID,Val1) VALUES +(@ID,@Val1)"; + + prm = new SqlParameter(); + prm.ParameterName = "@ID"; + prm.Value = 1; + cmd.Parameters.Add(prm); + + prm = new SqlParameter(); + prm.ParameterName = "@Val1"; + prm.Value = longstring; + prm.SqlDbType = SqlDbType.NText; // Comment and enjoy the +truncation + cmd.Parameters.Add(prm); + + cmd.ExecuteNonQuery(); + + sc.Close(); + } + } +} + +Database : Table1 is defined as having two columns : ID (integer) and +Val1 (ntext). For simplicity no PK was defined. + _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
