如何解$exception There is already an open DataReader associated with this Connect
当我多次执行
public DataSet GetDateSet(String sql,String tablename)
{
conn.Open();
MySqlDataAdapter sda = new MySqlDataAdapter(sql,conn);
DataSet ds = new DataSet();
sda.Fill(ds,tablename);
conn.Close();
return ds;
}
这个方法时为什么会出现+$exception
{"There is already an open DataReader associated with this Connection which must be closed first."} System.Exception {MySql.Data.MySqlClient.MySqlException}
请问各位好友该如何解决呢?