SqlConnection scnMASTER = new SqlConnection(Properties.Settings.Default.MASTER);
scnMASTER.Open();
String strSQL = " SELECT @@VERSION ";
SqlCommand cmd = new SqlCommand(strSQL, scnMASTER);
SqlDataReader rdr = cmd.ExecuteReader();
rdr.Read();
if (rdr[0] != DBNull.Value)
str = "VERSION:" + rdr[0].ToString() + "\r\n";
else
str = "VERSION:(不明)\r\n";
rdr.Close();
scnMASTER.Close();
最近のコメント