MySqlAdapter & .Net 3.5
Posted by: Scott Simon
Date: April 06, 2016 07:13AM

My program DataAdapter & Fill are not working, can MySqlDataAdapter be used with framework 3.5? This worked before in framework 2.0, but I don’t appear to be retrieving any data now. Here is the code used. The sql is working as I have used it in MySql workbench and it pulls the data.

string strSQL;

string strWhereAnd;

MySqlCommand objCmd;


MySqlConnection objMySqlConnection = null;

objMYSQLDB = new MYSQL_DB();

objMySqlConnection = objMYSQLDB.GetMySqlConnection();

objCmd = new MySqlCommand();

objCmd.CommandType = System.Data.CommandType.Text;

objCmd.Connection = objMySqlConnection;

System.Data.DataSet ds;

MySqlDataAdapter da;

ds = new System.Data.DataSet();

da = new MySqlDataAdapter(strSQL, objMySqlConnection); //'### Retrieve Data in to DataAdapter ....

objCmd.CommandText = strSQL;

da.SelectCommand = objCmd;

da.Fill(ds, "TBL1");

//### Fill DataSet from DataAdapter ....

return ds;

Options: ReplyQuote

Written By
MySqlAdapter & .Net 3.5
April 06, 2016 07:13AM

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.