Home All Groups Group Topic Archive Search About

How to attach mdf in a relative directory

Author
5 Nov 2005 10:46 AM
ad
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?

Author
5 Nov 2005 6:54 PM
Sahil Malik [MVP]
Please see - http://blogs.msdn.com/dataaccess/archive/2005/10/28/486273.aspx

- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.malik/archive/2005/05/13/63199.aspx
----------------------------------------------------------------------------

Show quote
"ad" <fly***@wfes.tcc.edu.tw> wrote in message
news:%235pHyXf4FHA.1148@tk2msftngp13.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?
>
>

AddThis Social Bookmark Button