[Mono-bugs] [Bug 564833] DataAdapter's fill method throws exception in connection with DbProviderFactories

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Dec 27 20:36:29 EST 2009


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

http://bugzilla.novell.com/show_bug.cgi?id=564833#c2


--- Comment #2 from Steven Berry <steven at berry.asn.au> 2009-12-28 01:36:21 UTC ---
The DbDataAdapter class defines _selectCommand. All of the concrete DataAdapter
classes also define _selectCommand (or selectCommand) fields. Either
DbDataAdapter or the concrete classes should declare the field, not both.

Instead of the above Fill(...) fix, I have now run the following, which works
for my application only. I haven't checked it for recursion bugs.

Change in DbDataAdapter.cs

Remove _selectCommand etc.

IDbCommand IDbDataAdapter.SelectCommand {
    get { return ((DbDataAdapter)this).SelectCommand; }
    set { ((DbDataAdapter)this).SelectCommand = (DbCommand)value; }
}

IDbCommand IDbDataAdapter.UpdateCommand{
    get { return ((DbDataAdapter)this).UpdateCommand; }
    set { ((DbDataAdapter)this).UpdateCommand = (DbCommand)value; }
}

IDbCommand IDbDataAdapter.DeleteCommand{
    get { return ((DbDataAdapter)this).DeleteCommand; }
    set { ((DbDataAdapter)this).DeleteCommand = (DbCommand)value; }
}

IDbCommand IDbDataAdapter.InsertCommand{
    get { return ((DbDataAdapter)this).InsertCommand; }
    set { ((DbDataAdapter)this).InsertCommand = (DbCommand)value; }
}

[Browsable (false)]
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public DbCommand SelectCommand {
    get { return (DbCommand) ((IDbDataAdapter)this).SelectCommand; }
    set { ((IDbDataAdapter)this).SelectCommand = value; }
}

[Browsable (false)]
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public DbCommand DeleteCommand {
    get { return (DbCommand) ((IDbDataAdapter)this).DeleteCommand; }
    set { ((IDbDataAdapter)this).DeleteCommand = value; }
}

[Browsable (false)]
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public DbCommand InsertCommand {
    get { return (DbCommand)((IDbDataAdapter)this).InsertCommand; }
    set { ((IDbDataAdapter)this).InsertCommand = value; }
}

[Browsable (false)]
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public DbCommand UpdateCommand {
    get { return (DbCommand)((IDbDataAdapter)this).UpdateCommand; }
    set { ((IDbDataAdapter)this).UpdateCommand = value; }

-- 
Configure bugmail: http://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