\[code\]public DataTable getTable(String mSql){ DataTable mTable = new DataTable(); MySqlDataAdapter mAdapter = new MySqlDataAdapter(); MySqlCommand mCommand = new MySqlCommand(); String mStr = ""; Connection mConnection = getConnection(); try { mCommand.CommandText = mSql; mAdapter.SelectCommand = mCommand; for (; ; ) { try { mCommand.Connection = mConnection.getConnection(); mAdapter.Fill(mTable); break; } catch (MySqlException ex) { mStr = ex.Message; mConnection.release(); mConnection = getConnection(); } } return mTable; } catch (Exception e)\[/code\]