Why isn't this Update working?
Posted by:
Dave Mecteaux ()
Date: November 10, 2008 01:31PM
Could someone tell me why this Update isn't working? I keep getting a exception.
Here is the code:
dataset_report_definitions = new System.Data.DataSet();
String query1 = "SELECT * FROM i_reports WHERE Product = '" + product_name + "' AND Made_By = 'Test'";
adapter_report_definitions = new MySqlDataAdapter(query1, mysqlconnection_report_definitions);
commandbuilder_report_definitions = new MySqlCommandBuilder(adapter_report_definitions);
try
{
adapter_report_definitions.Fill(dataset_report_definitions, "T1_test");
}
catch (MySqlException exception)
{
System.Windows.MessageBox.Show(exception.Message, "ERROR with your SQL statement", MessageBoxButton.OK, MessageBoxImage.Exclamation, MessageBoxResult.OK);
Close();
return;
}
dataset_report_definitions.Tables["T1_test"].Rows[0]["Report_XML_Text"] = "Test_Text";
int i = adapter_report_definitions.Update(dataset_report_definitions, "T1_test");
I keep getting this exception:
"Dynamic SQL generation is not supported against a SelectCommand that does not return any base table information."
Sorry, you can't reply to this topic. It has been closed.
© 1995-2008 MySQL AB, 2008- Sun Microsystems, Inc.