The usual way to do that is to export the database to a .sql file
and use an installer to re-create the database in the db platform.
The ability to copy databases as files is enabled by default in SSE.
You could also, simply, copy the .mdf file and
use an AttachDBFileName connection string.
See the section titled "Connecting Using AttachDBFilename" at :
http://msdn.microsoft.com/library/de...sesecurity.asp
Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ :
http://asp.net.do/faq/
Foros de ASP.NET en Español :
http://asp.net.do/foros/
======================================
"ad" <fl****@wfes.tcc.edu.tw> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I wnat to copy my web applicaiton with .mdf to another machine.
I want that:
If the .mdf is not attatch to database server, it will attached by program when
application start.
How can I do that?
"Juan T. Llibre" <no***********@nowhere.com>
¼¶¼g©ó¶l¥ó·s»D:uv**************@TK2MSFTNGP10.phx.g bl... The mdf file is *already attached*, isn't it ?
Why did you detach it, if you did ?
Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"ad" <fl****@wfes.tcc.edu.tw> wrote in message
news:eX*************@TK2MSFTNGP10.phx.gbl...I use asp.net 2.0 and SqlServer 2005 Express to develop my Web application
The database file of my applicaiton is "db.mdf", I put it in "myDB" directory under
the application folder.
I want to attach the mdf file when application start. How can I do that?