Skip navigation links

MySQL Forums


Advanced Search

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."

Options: ReplyQuote


Subject Written By Posted
Why isn't this Update working? Dave Mecteaux 11/10/2008 01:31PM
Re: Why isn't this Update working? Dave Mecteaux 02/27/2009 01:58PM
Re: Why isn't this Update working? Dave Mecteaux 03/02/2009 12:53PM


Sorry, you can't reply to this topic. It has been closed.