简体   繁体   English

如何在包含SQL Server的C#中构建设置

[英]How can I build a setup in C# with SQL Server included

I created an application using Visual Studio 2010 using SQL Server 2008. How can I build a setup file? 我使用SQL Server 2008使用Visual Studio 2010创建了一个应用程序。如何构建安装文件?

Is it any need of installing SQL Server on another PC to execute my application? 是否需要在另一台PC上安装SQL Server来执行我的应用程序?

Question 1: How can I build a setup file? 问题1:如何构建安装文件?

If you want to build a setup file you need to create a project of Enable InstallShield Limited Version from Setup and Deployment category (in Visual Studio 2012 IDE) 如果要构建安装文件,则需要从“ Setup and Deployment类别(在Visual Studio 2012 IDE中)创建“ Enable InstallShield Limited Version项目

Follow the steps from this link: 按照此链接中的步骤操作:

How to create Setup file 如何创建安装文件

Question 2: is it any need of installing SQL Server on another PC to execute my application? 问题2:是否需要在另一台PC上安装SQL Server来执行我的应用程序?

If you are maintaining any server machine for maintaining your database then you do not need to install SQL Server on client PC's as you can always refer to the DB-Server machine by just providing DB-Server hostname/IP address in the ConnectionString as below: 如果您要维护任何服务器计算机来维护数据库,那么您不需要在客户端PC上安装SQL Server,因为您始终可以通过在ConnectionString提供DB-Server主机名/ IP地址来引用DB-Server计算机,如下所示:

String connectionString="Data Source=MyDBServerHostName;Initial Catalog=myDBName;UID=myUserID;password=myPassword;Integrated Security=True;"

If you don't have any server to maintain database, then you need to install SQL Server on client PC. 如果您没有任何服务器来维护数据库,则需要在客户端PC上安装SQL Server。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM