如何通过IP连接WCF和Sql [英] how do connect WCF AND Sql via IP

查看:63
本文介绍了如何通过IP连接WCF和Sql的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经构建了一个将数据库与Android应用程序连接起来的服务,现在问题是我在笔记本电脑上运行服务,该笔记本电脑位于我的数据库所在的同一网络上,笔记本电脑通过Wi-Fi连接到有线网络。对于Android应用程序的功能,笔记本电脑上我使用app并且使用应用程序的移动设备必须在同一个network.i之前使用以下连接字符串

i have build a service that connect db with Android apps ,now problem is that i running service on a laptop which is on same network on which my db is present,laptop is connected through wi fi to the wired network. for the functioning of android app ,laptop on which i configered the service and mobile that is using app must be on same network.i previously using following connection string

string con_string = "Data Source=sajid-pc;Initial Catalog=CTPHR;Integrated Security=True";



我如何修改它可以与sql server连接的字符串,使服务和应用程序正常工作


how do i modify this string that it can connect with sql server ,make service and apps working properly

推荐答案

使用ip地址代替sajid-pc。您也可以使用服务器名称(如果有)。
Use ip address in place of "sajid-pc". You can also use server name instead(if there).


这篇关于如何通过IP连接WCF和Sql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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