如何运行SQL Server数据库上的客户端的软件客户端、数据库、软件、SQL

由网友(各种坚强、)分享简介:我已经设计了一个帐户的软件为我的客户。我使用的SQL Server 2008数据库存储过程。这是发达国家在Visual Studio 2010中,点网框架3.0。我使用的是Windows 7 500多家客户的主要问题是:版 为SQL Server运行时自动与DOTNET框架安装?由于MS Access数据库并不要...

我已经设计了一个帐户的软件为我的客户。我使用的SQL Server 2008数据库存储过程。这是发达国家在Visual Studio 2010中,点网框架3.0。我使用的是Windows 7 500多家客户 的主要问题是:版 为SQL Server运行时自动与DOTNET框架安装?由于MS Access数据库并不要求办公室被安装在客户端。 我不能每个客户端,它是一个艰巨的任务在安装了SQL Server 2008。另外,客户端没有安装过程中有很好的了解。 如何在不使用在客户端上安装的设置运行在客户端上的SQL Server数据库?是否有任何运行时文件或设置?

I have designed an accounts software for my clients. I used Sql Server 2008 database with Stored Procedures. It is developed in Visual Studio 2010, dot net framework 3.0. I have more than 500 clients using windows 7. The major problem is : Is sql server runtime is automatically installed with dotnet frameworks ? As MS Access database does not required Office to be installed on client. I can not installed sql server 2008 on each client, its a tough job. Also the clients are not having a good knowledge of installation process. How to run sql server database on clients without installing its setup on clients ? Is there any runtime files or setup ?

推荐答案

选项1 - 安装项目:

使用Visual Studio 2010,您可以创建一个安装项目并安装在安装过程中需要prerequisites。

Using Visual Studio 2010 you can create a setup project and install prerequisites that you need during installation.

安装过程非常简单,最终用户可以单击Next按钮后,安装应用程序和prerequisites。

The installation process is very simple and the end user can install application and prerequisites after clicking next buttons.

如何创建或添加安装项目

如何安装prerequisites在Windows Installer部署

演练:使用自定义操作创建数据库的安装

当设置prerequisites,它足以选择 SQL Server 2008的防爆preSS

When setting prerequisites, its enough to select SQL Server 2008 Express.

选项2 - ClickOnce的:

使用Visual Studio 2010的另一种选择是使用ClickOnce发布。 在项目的属性,请在发布选项卡上,单击prerequisites按钮,您可以选择SQL防爆preSS在prerequisites。通过这种方式,你只需要设置你的数据库文件输出目录拷贝,并使用AttachDbFileName在连接字符串:数据源= SQLEX $ P $干燥综合征; AttachDbFilename = | DataDirectory目录| Database.mdf;初始目录=主

Using Visual Studio 2010 another option is using ClickOnce publishing. In properties of your project, in publish tab, click prerequisites button, you can select SQL Express in prerequisites. This way, you only need to set your database files to copy in output directory, and use AttachDbFileName in connection string: Data Source=.SQLEXPRESS; AttachDbFilename=|DataDirectory|Database.mdf; Initial Catalog=Master"

如何:使用发布发布ClickOnce应用程序向导

步骤创建一个安装项目:

1 - 创建一个C#Windows窗体应用程序

创建一个C#Windows窗体项目 在添加新项,并添加SQL Server数据库到应用程序 将表添加到您的应用程序,并填写了一些数据,它 显示在主表单中的数据。

2 - 创建一个安装项目

在添加新项目=>设置和部署=>安装项目 右键点击Setup项目,并添加项目输出和主项目中选择主输出 右键点击Setup项目,并添加项目输出,并从你的主要项目中选择内容文件 在安装项目右键单击,然后单击属性,然后单击prerequisites并选择SQL Server的防爆preSS 选择.Net框架 选择Windows安装程序 从同一位置的我的应用程序选择单选按钮,下载prerequisites。 右键点击桌面的用户在左窗格中,并添加新的快捷方式并选择应用程序文件夹,从SampleApplication主输出,然后单击确定和重命名抄近路到你所需要的。 重建解决方案。 在重建安装项目 进入安装项目的输出目录和运行setup.exe add new project => setup and deployment => setup project Right Click on Setup project and Add project Output and select primary output from your main project Right Click on Setup project and Add project Output and select content files from your main project Right CLick on setup project and Click Properties and click Prerequisites and select SQL Server Express Select .Net Framework Select Windows Installer Select radio button Download prerequisites from the same location as my application. Right Click on Users Desktop at left pane and add new Shortcut and select application folder, primary output from SampleApplication, and click ok and the rename the short cut to what you need. Rebuild solution. Rebuild Setup Project Go to Output directory of setup project and run setup.exe

就是这么简单。

阅读全文

相关推荐

最新文章