[Mono-bugs] [Bug 595759] New: DBNull.Value are converted to null after Importing a DataRow

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Apr 12 10:27:38 EDT 2010



           Summary: DBNull.Value are converted to null after Importing a
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.6.x
          Platform: Macintosh
        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: Dominique.Normand at cegedim.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

Created an attachment (id=353759)
 --> (http://bugzilla.novell.com/attachment.cgi?id=353759)
Standalone test case

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us)
AppleWebKit/531.22.7 (KHTML, like Gecko) Version/4.0.5 Safari/531.22.7

After a DataRow that has a state of "Unchanged" is imported, the columns that
were set to DBNull.Value in the original row have a value of null in the new

Since it was assumed that row[col] would never returned null, we have a lot of
' Row[col].ToString() ' in our code that was written for Microsoft .NET. Now
that we're converting to MONO, we get lots of exception. 

We're able to work around the problem by fixing the values in the
"OnRowChanging" event of the DataTable but that's not optimal.

Reproducible: Always

Steps to Reproduce:
1. Execute Attached Standalone test case
Actual Results:  
Throws an exception

Expected Results:  
No exception

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