[Mono-bugs] [Bug 74650][Nor] New - DataViewRowState. ModifiedOriginal and DataViewRowState. Deleted are not filtering the values properly

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 18 Apr 2005 06:21:47 -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 appasamy@rediffmail.com.

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

--- shadow/74650	2005-04-18 06:21:47.000000000 -0400
+++ shadow/74650.tmp.10680	2005-04-18 06:21:47.000000000 -0400
@@ -0,0 +1,101 @@
+Bug#: 74650
+Product: Mono: Class Libraries
+Version: 1.1
+OS: Red Hat 9.0
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.Data
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: appasamy@rediffmail.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: DataViewRowState. ModifiedOriginal   and  DataViewRowState. Deleted  are not filtering the values properly   
+
+Description of Problem:
+
+DataViewRowState.ModifiedOriginal  and DataViewRowState.Deleted  are not 
+filtering the values properly.
+
+DataViewRowState.ModifiedOriginal gives only the modified value and not 
+the orginal value modified as expected.
+
+DataView.Deleted  is  not giving the deleted row values instead  of that 
+it throws exception.
+
+
+
+Steps to reproduce the problem:
+
+1. Create a table in your DBMS
+
+2. Execute the following program:
+   (Change neccessary fields as required) 
+ 
+3. 
+ using System;
+ using System.Data;
+ using System.Data.Odbc;
+ 
+ public class Test 
+ {
+    public static void Main(string[] args)
+    {
+		
+       // Change connection string as per your configuration
+       string connectionString = 
+          "DSN=MYSQL;" +
+          "UID=root;" +
+          "PWD=";
+       OdbcConnection dbcon;
+       dbcon = new OdbcConnection (connectionString);
+       dbcon.Open ();
+       OdbcCommand dbcmd = dbcon.CreateCommand();
+      OdbcDataAdapter adapter  = new OdbcDataAdapter ("SELECT * FROM  
+new", dbcon );
+      DataSet dataset  =  new DataSet ("new");
+       adapter. Fill  (dataset);
+      DataView dataView = new DataView  (dataset.Tables[0]);
+      dataView.AllowEdit=true;
+      // Editing the first row value 
+     dataView[0]["E_Name"]="newvalue";
+     dataView.RowStateFilter=DataViewRowState.ModifiedOriginal;
+     string cname = String.Empty;
+
+      //Displaying the Modified row's Original value
+     for (int i=0;i<dataView1.Count;i++)
+     { 
+       cname = dataView1[i]["E_Name"].ToString();
+      Console.WriteLine("Name: "+cname);
+     }
+    dbcmd.Dispose();
+    dbcmd = null;
+    dbcon.Close();
+    dbcon = null;
+   }
+}
+
+
+Actual Results:
+
+Name: newvalue
+
+Expected Results:
+
+Name: Appasamy
+
+How often does this happen? 
+
+Always
+
+Additional Information:
+
+The above code is tested with  MS-ACCESS and C# in windows and the 
+results are as expected.  
+The above code is used for reproducing only  the bug with  
+DataViewRowState. ModifiedOriginal  and the code for reproducing the bug 
+with  DataViewRowState. Deleted is attached as test code.