1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
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(); |
コメント