Ejemplo n.º 1
0
 private void connectionTestBtn_Click(object sender, EventArgs e)
 {
     adapter = new SqlAdapter(SelectedServerType, GetConnectionString(false));
     if (adapter.ConnectToDatabase())
     {
         MessageBox.Show("连接成功");
     }
     else
     {
         MessageBox.Show("数据库连接失败", "提示", MessageBoxButtons.OK, MessageBoxIcon.Hand);
     }
 }