Re: Dynamic SQL generation failing
Posted by: David Harvey
Date: May 07, 2021 06:04PM

I did not do a full expansion and none of the columns are invisible.

I did, however, find a solution.

I changed the Data Adapter instantiation, put the Builder instantiation before the Fill statement, and then removed the Get*Commands.

Now everything works. I have no idea why, what makes the difference, or what has changed from previous versions.

Here is the good code:

var sc = new MySqlConnection(MySQLConnectString);
var sa = new MySqlDataAdapter();
sa.SelectCommand = new MySqlCommand("SELECT * FROM Table_Name", sc);
var builder = new MySqlCommandBuilder(sa);
var ds = new DataSet();
sa.Fill(ds, "Table_Name");

Thanks for the help!!

Dave Harvey

Options: ReplyQuote


Subject
Written By
Posted
Re: Dynamic SQL generation failing
May 07, 2021 06:04PM


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

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.