Load SQL Server db when application starts

P

Phil Johnson

I have a C# app using a SQL Server db which is attached to my SQL Server,
when I deploy though I want the app to lift (or load) the SQL Server at
runtime so the user does not have to attach to the mdf file, I can just
include it in my application folder and it will load when the application
runs.

Am I right in thinking I can just detach my current mdf file from SQL server
and put it in the application folder (or is there a better sub floder to put
it in)?

Also, does anybody have any examples of connection strings that will load a
db file in this way, rather than containing the server name etc?

--
Regards,

Phillip Johnson (MCSD For .NET)
PJ Software Development
www.pjsoftwaredevelopment.com
 

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

Top