将本地桌面应用程序与远程SQL Server数据库连接 [英] connecting local desktop application with remote sql server database

查看:86
本文介绍了将本地桌面应用程序与远程SQL Server数据库连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了一个c#.net应用程序.
该应用程序后端是sql server.
当应用程序和数据库位于同一台计算机上时,它可以正常工作.
我想知道如何将我的应用程序与远程服务器数据库连接.
意味着数据库将位于远程计算机中,它们将通过LAN连接.

如果有人知道该怎么做,请回复.............


当我将数据源分配为服务器IP地址时,它给出了错误信息....


在客户端必须安装哪些软件........请帮助.....
以及如何在客户端允许Intranet区域........

i have created one c#.net application.
in that application back-end is sql server.
when the application and database are on same machine , it works fine.
i want to know how can i connect my application with remote server database.
means the database will be in remote computer , they will connected through LAN.

if any one know how to do this, PLEASE reply.............


when i assign Data Source as server ip address it gives error....


at client side which software i have to install........please help.....
and how to allow intranet zone at client side........

推荐答案

在数据源"中指定数据库服务器名称和实例名称.连接字符串的属性.如果它是默认实例,则仅指定服务器名称.
specify your database server name and instance name in the ''Data Source'' attribute of the connection string. If it is the default instance, specify the server name alone.


看看


试试这个,
connectionString ="Data Source =" ip;初始目录=";用户ID =";密码=""

try this,
connectionString="Data Source="ip";Initial Catalog="";User ID="";Password=""


这篇关于将本地桌面应用程序与远程SQL Server数据库连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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