想要使用单个数据库在多个系统上使用Windows窗体应用程序 [英] Want to use the windows forms application on multiple system using single database

查看:80
本文介绍了想要使用单个数据库在多个系统上使用Windows窗体应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在使用单个服务器的不同机器上使用Windows窗体应用程序



我尝试过:



已安装的Windows应用程序正在使用具有sql server的系统,但在其他系统上安装Windows应用程序时,它无法正常工作。

解决方案

你所要做的就是:



  1. 在SQL Server中启用服务器网络协议,然后其他计算机就可以连接到该服务器。

    启用或禁用服务器网络协议 [ ^ ]
  2. 在MS SQL服务器上创建单个帐户,使用最小权限授予访问权限以修改数据库数据(而不是对象!)
  3. 使用 SqlConnection [ ^ ]连接到MS SQL Server实例
  4. 创建SqlCommand [ ^ ]获取/修改数据。
  5. 这就是全部!





详情请见:

ADO.NET [ ^ ]

ADO.NET代码示例 [ ^ ]

创建一个简单的数据应用程序,使用ADO.NET [ ^ ]


How to use the windows forms application on different machine using single server

What I have tried:

Installed windows application is working on the system which has sql server but while installing the windows application on other system it is not working.

解决方案

All what you have to do is:


  1. Enable a server network protocol in SQL Server, then the other computers will be able to connect to that server.
    Enable or Disable a Server Network Protocol[^]
  2. Create single account on MS SQL server with minimum privileges to grant acces to modify database data (not objects!)
  3. Use SqlConnection[^] to connect to the instance of MS SQL Server
  4. Create SqlCommand[^] to get/modify data.
  5. That's all!



For further details, please see:
ADO.NET[^]
ADO.NET Code Examples[^]
Create a simple data application by using ADO.NET[^]


这篇关于想要使用单个数据库在多个系统上使用Windows窗体应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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