0
votes

I need SQL Server Express 2008 as a prerequisite for my WPF application. As a result I have selected:

enter image description here

That works great. When the user installs the application if he does not have SQL Server 2008 Express the installer will download the necessary files and install SQL Server Express.

When the installation is done the user now has my project installed along with the prerequisites (SQL Server 2008 Express)

Now the problem is how do I connect to that database. What will the connection string be?

edit

Sorry for explaining my self incorrectly. I want to connect to the database engine so that I can execute my dabase1.sql script in order to create the database and tables needed for my application.

2

2 Answers

4
votes

You can refer to a local SQL Express instance in the connection string by

"Data Source=.\SQLEXPRESS; ...."
2
votes

Just because the server is installed (./SQLEXPRESS) doesn't mean that your database will be deployed to that server. I think you would still have to run a deployment script after this prerequisite step is complete.