private void buttonConnectionTestConnection_Click(object sender, System.EventArgs e)
{
string connectString = SqlServers.BuildConnectionString(radioButtonConnectionIntegratedSecurity.Checked, comboBoxConnectionDatabaseName.Text, comboBoxConnectionServerName.Text, textBoxConnectionUserName.Text, textBoxConnectionPassword.Text);
bool valid = SqlServers.TestConnectionString(connectString);
if (valid)
{
MessageBox.Show("Connection Succeeded.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
MessageBox.Show("The information does not describe a valid connection string.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}