检测SQL Server连接
string CONN_STRING_NON_DTC = "server=RL;database=GBGDS;Uid=sa;Pwd=sa "
public static bool isConnecting()
{
SqlConnection conn = new SqlConnection(CONN_STRING_NON_DTC);
try
{
if(Detect(ConfigurationSettings.HL7Config.SqlServerAddress) == false)
return false;
else
{
conn.Open();
conn.Close();
return true;
}
}
catch(Exception e)
{
return false;
}
}