如何运行SQL Server数据库上的客户端的软件 [英] How to run sql server DB based software on clients

查看:204
本文介绍了如何运行SQL Server数据库上的客户端的软件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经设计了一个帐户的软件为我的客户。我使用的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.

  1. 如何创建或添加安装项目

如何安装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"

步骤创建一个安装项目:

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

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

2 - 创建一个安装项目

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

就是这么简单。

这篇关于如何运行SQL Server数据库上的客户端的软件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆