Detach is not actually removing anything like database. Files are staying in
the same folder where they were created. Just server forgets about these
files and ignores them on subsequent runs. That's why Nicholas mentions you
need to find out where files are residing before detaching. See ,mdf and ldf
files in BOL. Usually they are in Data subfolder of installation path.
HTH
Alex
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote in
message news:B6**********************************@microsof t.com...
Detaching a database doesn't save anything about it. It simply removes
the database from the server. You will have to get the properties of the
files that make up the database before you detach it.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Rogelio" <Ro*****@discussions.microsoft.comwrote in message
news:C2**********************************@microsof t.com...
>so I notice to detach a database you use
Server svr = new Server();
svr.DetachDatabase("MyDatabase");
but is there a way you can set where its saved after detaching ? thansk