I'm having problems attaching a database using C# code. I have a little application in c sharp that I'm attempting to modify that will attach a database. Currently, I require that it will work with Framework 3.5. I see the SMO has an attachdatabase method however I don't think its available in the 3.5 framework. I assume that I could also use a ExecutenonQuery to execute a TSQL attach script but I'm unsure how this would work.
Currently the application uses the following references