How to attach mdf in a relative directory

A

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?
 
K

Kevin Spencer

What do you want to attach it to?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
A watched clock never boils.
 
J

Juan T. Llibre

The mdf file is *already attached*, isn't it ?

Why did you detach it, if you did ?
 
A

ad

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,689
Members
48,796
Latest member
Greg L.

Latest Threads

Top