Bug 12853 - Ado.net TableAdapter Update Method Fails Or Results In RowError
Summary: Ado.net TableAdapter Update Method Fails Or Results In RowError
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Data ()
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2013-06-24 13:55 UTC by jhpetersen
Modified: 2013-08-08 02:25 UTC (History)
3 users (show)

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

Small Visual Studio 2012 Solution To Reproduce The Bugs (194.89 KB, application/octet-stream)
2013-06-24 13:55 UTC, jhpetersen

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 12853 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description jhpetersen 2013-06-24 13:55:08 UTC
Created attachment 4190 [details]
Small Visual Studio 2012 Solution To Reproduce The Bugs

There are two major issues with the Ado.net TableAdapter.Update() method:

1.) If one inserts or updates a DataRow and then the TableAdapter.Update(DataSet) method is called, the method fails with an exception that the column cannot be null. Debugging the generated SQL command shows that all parameters passed are NULL.

2.) If one inserts or updates a DataRow and then the TableAdapter.Update(DataTable) method is called, the update succeeds but a RowError for the inserted/updated row is set. Any following TableAdapter.Fill(DataTable) fails with a ConstraintException - even if another table is filled.

The two bugs don't occur with Microsoft .Net and are reproducible with latest stable Mono on Windows 7, Mac OSX 10.8 and Linux Debian Wheezy.

I attached a small Visual Studio 2012 Solution with two projects which show the bugs (one for a MSSQL Database and one for a MySQL Database using the latest stable MySQL.Net Connector).
To test the solution please extract the 7Zipped file and create the database(s) with the supplied SQL Dump file. (for MySQL you have to create the user by yourself..). Change the connection string according to your server name and user id/pass..
Have a look on the comments in the source code to get more information..