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.c omwrote in
message news:B6******** *************** ***********@mic rosoft.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.co m
"Rogelio" <Ro*****@discus sions.microsoft .comwrote in message
news:C2******** *************** ***********@mic rosoft.com...
>so I notice to detach a database you use
Server svr = new Server();
svr.DetachDatab ase("MyDatabase ");
but is there a way you can set where its saved after detaching ? thansk