Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

deploy SQL Server Express database with desktop app?

I've created my first database based desktop app in .NET and not able to understand how can I deploy the database with the application installer, so that the database, application and the SQL Server is installed in one go.

If I only deploy the native client for SQL Server and the database with the installer, will it work?

The application uses the database very frequently.

like image 437
Vikas Avatar asked Nov 28 '09 18:11

Vikas


2 Answers

You need to install the SQL Express engine if you want to use it. Deploying only the client connectivity will give you exactly what the 'client connectivity' name implies: you'll be able to connect to a SQL Server. But only a running SQL Server instance will be able to read/write your application database.

The SQL Express install MSI is actually very customizable and allows for a lot of scenarios, including unattended setup and remote deployment. For the most basic options, see Configuring SQL Express During Installation. Your application installer will have to invoke the Express installer passing in the desired parameters.

like image 125
Remus Rusanu Avatar answered Nov 14 '22 10:11

Remus Rusanu


Using click once you can make sql server express a dependency of the main project and it would be deployed with the instalation data and installed, if it is not instaled yet, when you first install your app.

You can do it in the project properties, in Visual Studio.

like image 36
j.a.estevan Avatar answered Nov 14 '22 11:11

j.a.estevan