Bug 14902 - Update command is not generated for odbc
Summary: Update command is not generated for odbc
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Data (show other bugs)
Version: master
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2013-09-21 13:03 UTC by wdehoog
Modified: 2013-09-21 13:03 UTC (History)
1 user (show)

See Also:
Is this bug a regression?: ---
Last known good build:


Description wdehoog 2013-09-21 13:03:38 UTC
When calling Update on a DataSet I get an exception that there is no Select command. Indeed the DataAdapter does not have a command to execute the query.

I think it is caused by the CommandBuilder not being notified of the RowUpdated event. Due to the OdbcCommandBuilder having it's own reference to the DataAdapter it's base (DbCommandBuilder) uses another one to notify and the commands are not created.

Adding this to the end of the setter of OdbcCommandBuilder.DataAdapter seems to work
 base.DataAdapter = _adapter;

Note You need to log in before you can comment on or make changes to this bug.