Please tell me the rest of the code doesn't look like this...
Posted by: Marc's Musings,
on 10 Aug 2007 |
View original | Bookmarked: 0 time(s)
This is not right:internal static bool DoesDbExist(SqlConnection conn, string database){ using (SqlCommand cmd = conn.CreateCommand()) { // prefer this to a where clause as this is not prone to injection attacks cmd.CommandText = "SELECT name FROM sys.databases"; cmd.CommandType = CommandType.Text;
...