使数据库应用程序在其他计算机上运行 [英] Make Database Application to run on other computers

查看:113
本文介绍了使数据库应用程序在其他计算机上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!我正在制作我的第一个Windows窗体应用程序。一个简单的数据库应用程序,用于显示数据,在其中搜索和插入我正在使用Visual Studio来制作这个应用程序。我有一个困惑,如何将此应用程序转移到另一台计算机?通过
exe?如何使数据库应用程序可以在具有不同本地服务器名称和数据库名称的其他计算机上运行?由于我制作的应用程序连接到我的本地数据库,但客户端计算机的本地服务器和数据库的名称不同。
任何人都可以指导我吗?

解决方案

你好Hafsa,


>>如何将此应用程序转移到另一台计算机?通过exe?


您可以通过clickonce发布您的应用程序。


使用ClickOnce(Visual Studio 2008)部署Windows应用程序


>>如何制作可以在具有不同本地服务器名称和数据库名称的其他计算机上运行的数据库应用程序?


来自
这篇文章
你可以得到以下解决方案:


您是否将数据库包含为"应用程序文件"?如果不这样做(至少我是这样做的):


项目 - >属性 - >发布 - >应用程序文件


此处设置.mdf和xx_log.ldf的值,如下所示:



现在仍然在发布标签中继续前提条件。在这里,你必须根据你使用的数据库检查以下内容。



这将为正在安装应用程序的客户端下载SQL Server Express。


Hi! I am making my first windows form application. A simple database application that displays data, search in it and inserts. I am using Visual Studio to make this app. I have one confusion, how can I shift this application to another computer? Through exe? How to make database applications that can run on other computers with different local server names and database name? Since the app I made is connected to my local database but the client computer has different name for it local server and database. Can anyone please guide me?

解决方案

Hi Hafsa,

>>how can I shift this application to another computer? Through exe?

You can publish your application with clickonce.

Deploying Windows applications using ClickOnce (Visual Studio 2008)

>>How to make database applications that can run on other computers with different local server names and database name?

From this article you can get the following solution:

Did you include the database as "Application File"? If not do the following (at least this is how I am doing it):

Project -> Properties -> Publish -> Application Files

Here set the values for your .mdf and the xx_log.ldf as follows:

Now still in the Publish tab go on Prerequisites. Here you have to check the following depending on what database you are using.

This will download SQL Server Express for the client who is installing your application.


这篇关于使数据库应用程序在其他计算机上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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