Install Application with Database
Hello all and thanks in advance for any help.
I have built personal applications for a while now, and have used a local database in my applications.
I am currently creating an application that uses a SQL Express 2005 database and the application will be installable and distributable however I have come into an issue with the connection string. I have used them before locally, however I dont understand how it is suppossed to work on an installable application.
I'm using Visual Studio 2005 installation process and requiring SQL Express 2005 installed as a pre-requisite, but how do I get the application to get the correct connection string when the data source could be anything on the users machine?
The closest idea that I can guess is having the application assume the data source by concatenating the machine name and "\SQLEXPRESS", as it seems to be on my machine. So as an example, when the user runs the application, the app finds the machine name is "ACB123" so assumes the Data Source is ACB123\SQLEXPRESS.
Anyway I hope I have explained my situation well enough, and again thanks in advance for any help.