MessageBox.Show(\ } else {
MessageBox.Show(\!\ } }
catch (Exception ex) {
MessageBox.Show(ex.ToString()); } }
private void dataShow_CellContentClick(object sender, DataGridViewCellEventArgs e) { }
private void btnBroken_Click(object sender, EventArgs e) {
// string strCon = \Security=true \
string strCon = \ SqlConnection conn = new SqlConnection(strCon);
conn.Close();
txtDataName.Text = conn.DataSource.ToString(); txtState.Text = conn.State.ToString();//显示数据库链接状态 txtVersion.Text = \关闭数据库\显示数据库版本
dataShow.DataSource=null;//清空datagridview中的数据 } } }