[Mono-bugs] [Bug 59946][Blo] New - Unexpected Exception in DbDataAdapter.Update(DataTable)

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 10 Jun 2004 10:36:52 -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 uballestrazzi@igconsulting.it.

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

--- shadow/59946	2004-06-10 10:36:52.000000000 -0400
+++ shadow/59946.tmp.17179	2004-06-10 10:36:52.000000000 -0400
@@ -0,0 +1,67 @@
+Bug#: 59946
+Product: Mono: Class Libraries
+Version: unspecified
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 080 Two weeks
+Priority: Blocker
+Component: Sys.Data.SqlClient
+AssignedTo: rodrigo@novell.com                            
+ReportedBy: uballestrazzi@igconsulting.it               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Unexpected Exception in DbDataAdapter.Update(DataTable)
+
+Description of Problem:
+
+An exception is raised in
+DbDataAdapter.Update(DataTable)
+it's raised immediatly because TableMappings does not contain the 
+specified datatable. This is not the standard behaviour.
+
+Steps to reproduce the problem:
+
+Access a SQL Server then try to update using DA.Update.
+
+This is the sample:
+
+SqlConnection CN = new SqlConnection
+(@"Server=Hercules\Archivist;Database=TestLinux;User 
+ID=TestLinux;Password=dacambiare;Trusted_Connection=False");
+CN.Open();
+
+DataTable tbl = new DataTable();
+
+SqlDataAdapter DA = null;
+
+DA = new SqlDataAdapter("Select * from TestTable", CN);
+DA.Fill(tbl);
+
+SqlCommandBuilder SQLCB = new SqlCommandBuilder(DA);
+
+DataRow Row = tbl.NewRow();
+
+Row["Number"] = 25;
+Row["Text"] = "A simple text";
+
+tbl.Rows.Add(Row);
+
+DA.Update(tbl);
+
+
+
+
+Actual Results:
+Exception
+
+Expected Results:
+It should work
+
+How often does this happen? 
+Always
+
+Additional Information: