[Mono-bugs] [Bug 595899] New: Cannot access DataRowView data from a DataView with a state filter

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Apr 12 16:01:26 EDT 2010


http://bugzilla.novell.com/show_bug.cgi?id=595899

http://bugzilla.novell.com/show_bug.cgi?id=595899#c0


           Summary: Cannot access DataRowView data from a DataView with a
                    state filter
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.6.x
          Platform: Other
        OS/Version: Mac OS X 10.6
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.Data
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: curtis.wensley at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=353874)
 --> (http://bugzilla.novell.com/attachment.cgi?id=353874)
Sample console application to replicate issue

Description of Problem:
When creating a DataView with a DataViewRowState.Added filter, you cannot
access the column data of the DataRowView (throws an exception).

A snippet:

DataView view = new DataView(table, string.Empty, string.Empty,
DataViewRowState.Added);
foreach (DataRowView row in view)
{
    Console.WriteLine("Row:{0}, {1}", row[0], row[1]);    
}

This runs fine on MS.NET

Steps to reproduce the problem:
1.  Open attached sample project
2. Run project


Actual Results:
Causes a System.Data.VersionNotFoundException (see additional info)

Expected Results:
Should be able to access the column values through the DataRowView

How often does this happen? 
Every time

Additional Information:

This is the exception that is thrown:

Unhandled Exception: System.Data.VersionNotFoundException: There is no Proposed
data to accces.
  at System.Data.DataRow.AssertValidVersionIndex (DataRowVersion version, Int32
index) [0x00009] in
/private/tmp/monobuild/build/BUILD/mono-2.6.3/mcs/class/System.Data/System.Data/DataRow.cs:551 
  at System.Data.DataRow.IndexFromVersion (DataRowVersion version) [0x0007b] in
/private/tmp/monobuild/build/BUILD/mono-2.6.3/mcs/class/System.Data/System.Data/DataRow.cs:536 
  at System.Data.DataRow.get_Item (Int32 columnIndex, DataRowVersion version)
[0x00035] in
/private/tmp/monobuild/build/BUILD/mono-2.6.3/mcs/class/System.Data/System.Data/DataRow.cs:258 
  at System.Data.DataRow.get_Item (System.Data.DataColumn column,
DataRowVersion version) [0x00054] in
/private/tmp/monobuild/build/BUILD/mono-2.6.3/mcs/class/System.Data/System.Data/DataRow.cs:224 
  at System.Data.DataRowView.get_Item (Int32 ndx) [0x00043] in
/private/tmp/monobuild/build/BUILD/mono-2.6.3/mcs/class/System.Data/System.Data/DataRowView.cs:151 
  at TestDataViewFilters.MainClass.Main (System.String[] args) [0x00096] in
/Users/cwensley/Projects/test/TestDataViewFilters/TestDataViewFilters/Main.cs:21

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list