Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / March 2008

Tip: Looking for answers? Try searching our database.

Load SQL Server db when application starts

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Phil Johnson - 09 Mar 2008 20:03 GMT
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?

Signature

Regards,

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

Phil Johnson - 10 Mar 2008 09:56 GMT
Found an answer to this one myself....

http://technet.microsoft.com/en-us/library/ms165716.aspx

Signature

Regards,

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

> 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
[quoted text clipped - 8 lines]
> 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?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.