Drop an SQL Server database

Dec 4, 2012 at 10:22 AM

Is there a method anywhere in the library to Drop an SQL Server database?
Thanks.

Eric 

Dec 4, 2012 at 9:14 PM

Not specifically, no. However you should be able to use the SQLHelper class to open a connection to the database and run any SQL you would like.

using(SQLHelper Helper=new SQLHelper("DROP DATABASE X","Connection String",CommandType.Text))
{
   Helper.ExecuteNonQuery();
}