Ejemplo n.º 1
0
        private void btnPing_Click(object sender, EventArgs e)
        {
            PingServiceReference.PingServiceClient client = new PingServiceReference.PingServiceClient();
            bool result = client.IsDbUp(txtConnString.Text);

            lblResult.Text = "Database with connection string " + txtConnString.Text + " is up? " + result;
        }
Ejemplo n.º 2
0
 private void btnPing_Click(object sender, EventArgs e)
 {
     try
     {
         PingServiceReference.PingServiceClient client = new PingServiceReference.PingServiceClient();
         bool result = client.IsDbUp(txtConnString.Text);
         lblResult.Text = "Database with connection string " + txtConnString.Text + " is up? " + result;
     }
     catch (FaultException <PingServiceReference.PingException> ex)
     {
         MessageBox.Show(ex.Detail.Message);
     }
 }