在两台机器上安装我的应用程序 [英] Installing my application on two machine

查看:83
本文介绍了在两台机器上安装我的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在两台机器上安装了使用C#2.0和SQL Server 2005开发的Windows窗体应用程序驻留在同一个地方。我是否必须在两台机器上安装SQL Server 2005 ???

如果是,那么用户可以如何使用它。???如果没有,那我该怎么办?

请建议我很好的解决方案。谢谢

I installed my Windows Form Application developed by using C# 2.0 and SQL Server 2005 on two machines reside in same place. Will I have to install SQL Server 2005 on both machines???
If yes, then how the user can it.??? If not, then what I have to do??
Please suggest me good solution. Thanks

推荐答案

NO!



这就是整个想法 - SQL Server是一个SERVER数据库 - 多个用户向SQL Server发出请求,它与数据库文件协调并提供结果。如果您为第二台PC安装第二个实例,那么它将使用不同的数据库文件,您将无法在用户之间共享信息。



所有你(可能)需要做的是将其中一台PC上的连接字符串更改为指向另一台PC(除非您在第三台PC上安装了SQL服务器,在这种情况下,如果它们位于同一局域网上,它应该可以正常工作,并且做得好!)



话虽如此,我有两个SQL Server安装:一个用于生产,一个用于我的PC进行开发。这样,如果我在更改代码时执行cockup,它不会以任何方式影响生产数据。那是因为两个SQL实例之间没有共享数据。
NO!

That's the whole idea - SQL Server is a SERVER database - multiple users make requests to SQL Server, it coordinates them with the database file and serves up the results. If you install a second instance for your second PC, then it will use a different database file and you will not be able to share information between your users.

All you (probably) need to do is change the Connection String on one of the PCs to point at the other PC (unless you installed SQL server on a third PC in which case it should just work provided they are on the same LAN, and well done!)

Having said that, I have two installations of SQL Server: one for production and one on my PC for development. That way, If I perpetrate a cockup when altering the code it does not affect the production data in any way. That's because there is no data shared between the two SQL instances.


编写代码时,你应该有一个连接字符串,告诉你的代码如何连接到SQL。所以,不,你只需要一台两台机器都可以访问的SQL Server。
When you wrote your code you should have a Connection String which is how you tell your code how to connect to SQL. So, no, you just need 1 SQL Server that both machines can access.


这篇关于在两台机器上安装我的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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