Instead of using MySqlDataReader, you can return a DataSet, for example:
connMySql.Open(); MySqlCommand cmd = new MySqlCommand(SQL, connMySql); DataSet ds = new DataSet(); MySqlDataAdapter objDataAdapter = new MySqlDataAdapter(cmd); objDataAdapter.Fill(ds, "reading"); connMySql.Close();
Hope this helps. FYI, you can alternately return the data set this way:
DataSet ds = MySql.Data.MySqlClient.MySqlHelper.ExecuteDataset(oConn, SQL);
source share