In the past we have used SQLDMO and call a C++ dll through installscript to attach and detach our databases. With Sql 2005 Express SQLDMO is no longer included and Microsoft says you should use SQLSMO. I tried writing a C# dll using SQLSMO and in t...