[Mono-bugs] [Bug 59946][Maj] Changed - Unexpected Exception in SqlDataAdapter.Update(DataTable)

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 30 Jun 2004 01:14:57 -0400 (EDT)


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 sumadevi@novell.com.

http://bugzilla.ximian.com/show_bug.cgi?id=59946

--- shadow/59946	2004-06-24 18:24:13.000000000 -0400
+++ shadow/59946.tmp.10781	2004-06-30 01:14:57.000000000 -0400
@@ -1,13 +1,13 @@
 Bug#: 59946
 Product: Mono: Class Libraries
 Version: unspecified
 OS: All
 OS Details: 
-Status: NEW   
-Resolution: 
+Status: RESOLVED   
+Resolution: FIXED
 Severity: 080 Two weeks
 Priority: Major
 Component: Sys.Data.SqlClient
 AssignedTo: sumadevi@novell.com                            
 ReportedBy: uballestrazzi@igconsulting.it               
 QAContact: mono-bugs@ximian.com
@@ -66,6 +66,91 @@
 
 Additional Information:
 
 ------- Additional Comments From atsushi@ximian.com  2004-06-24 18:24 -------
 Now DbDataAdapter part of the problem should be fixed. However, there
 seems Mono.Data.Tds problem.
+
+------- Additional Comments From sumadevi@novell.com  2004-06-30 01:14 -------
+There were 2 problems.
+1. The commandBehavior parameter passed to the SqlCommand.Execute was
+not taken into consideration
+2. The Tds packet handling was not handling TdsPacketSubType.TableName
+
+Test Program used to check is below.
+using System;
+
+using System.Data;
+
+using System.Data.SqlClient;
+
+
+
+namespace MonoTests.System.Data
+
+{
+
+	class SqlDataReaderTest
+
+	{
+
+                public static void Main(string[] args)
+
+                {
+
+					String connectionString = null;
+
+					SqlConnection con;
+
+					SqlCommand cmd;
+
+					SqlDataReader reader;
+
+
+
+					//Fill the conenction string for SQL Server
+
+					    connectionString = "Server=164.99.168.131;" +
+
+                                                "Database=Northwind;" +
+
+                                                "User ID=sa;" +
+						"Password=novell";
+					con = new SqlConnection(connectionString);
+
+					Console.WriteLine ("Opening Connection...");
+					con.Open();
+		new SqlDataReaderTest().test59946(con);
+					con.Close();
+				
+
+                }
+
+
+		
+
+		private void test59946(SqlConnection con)
+		{
+			DataTable dt = new DataTable();
+			SqlDataAdapter da = null;
+			da = new SqlDataAdapter("Select * from Region;", con);
+			da.Fill(dt);
+			SqlCommandBuilder cb = new SqlCommandBuilder (da);
+			DataRow dr = dt.NewRow();
+
+			dr["RegionID"] = 221;
+			dr["RegionDescription"] = "Umadevi Santhanam";
+		
+			dt.Rows.Add(dr);
+			da.Update(dt);
+			Console.WriteLine("Done !!!");
+		}		
+	}
+
+}
+
+
+Fix checked into  CVS.
+
+
+
+