[Mono-bugs] [Bug 421336] New: DbCommandBuilder throws exceptions on command creation

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Aug 29 05:00:52 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=421336


           Summary: DbCommandBuilder throws exceptions on command creation
           Product: Mono: Class Libraries
           Version: SVN
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.Data
        AssignedTo: bnc-blr-team-mono at forge.provo.novell.com
        ReportedBy: christian_hoff at gmx.net
         QAContact: mono-bugs at lists.ximian.com
          Found By: Development


Created an attachment (id=236170)
 --> (https://bugzilla.novell.com/attachment.cgi?id=236170)
Test case

The DbCommandBuilder class has several bugs leading to exceptions when creating
the update, insert and delete commands:

1. The "IsExpression" column in the column schema table can also be DBNull
which is equivalent to "false" but the DBCommandBuilder does not check for
DBNull and simply tries to cast it into a bool, which will fail.

2. The commands do not get refreshed after a call to UpdateSchema() because
they are not set to NULL. This has the consequence that empty commands(created
with CreateNewCommand()) are returned afterwards.

3. Multiple parameters with the same name are generated if the parameter names
should be named after the columns(this is difficult to explain, I'll attach a
comment with an example.

I have also attached a test case and a patch to fix these issues. I would be
great if you could apply it; after doing so the attached test case will work(it
uses a provider factory so can should be easily tested with any data provider).


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


More information about the mono-bugs mailing list