[Mono-list] DataAdapter.Update throws null constraint violation

DIP1 andrew.filby at dip.co.uk
Thu May 17 10:57:20 UTC 2012


I am having the same problem with the SqlDataAdapter. The following (example)
code results in a DB concurrency exception.

SqlCommand cmd = conn.CreateCommand ();
cmd.CommandText = "SELECT * FROM [ScheduledEvents] WHERE ID = 11";
			
DataSet dataSet = new DataSet ();
SqlDataAdapter adapter = new SqlDataAdapter (cmd);
			
SqlCommandBuilder builder = new SqlCommandBuilder (adapter);
adapter.Fill (dataSet);
			
DataRow dr = dataSet.Tables [0].Rows [0];
dr ["Description"] = "NEW";

dataSet.Tables [0].TableName = "[ScheduledEvents]";
adapter.Update (dataSet, "[ScheduledEvents]");

Is there any update on this issue or has a patch been created?

--
View this message in context: http://mono.1490590.n4.nabble.com/DataAdapter-Update-throws-null-constraint-violation-tp3727327p4642820.html
Sent from the Mono - General mailing list archive at Nabble.com.


More information about the Mono-list mailing list