开发者

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 Serve开发者_开发知识库r and the database with the installer, will it work?

The application uses the database very frequently.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜