使用远程sql数据库连接 [英] working with remote sql database connection

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

问题描述


让我们考虑应用程序在计算机1中运行,而sql数据库在计算机2中运行
而我的问题是我需要将应用程序中的值插入数据库 .. [通过tcp/ip],我也在sql server配置管理器中对其进行了配置.

给我一些样品吧
以及我们如何在连接字符串中进行配置


等待您的响应

Hi
let us consider application runs in machine 1 and sql database runs in machine 2
and my problem is i need to insert the values from application to database ..[via tcp/ip] and i too configured it in sql server configuration manager.

give me some samples regarding it
and how we have to configure in connection strings


waiting for your responses

推荐答案

尝试使用服务器资源管理器"窗格在VS中建立连接:
1)打开服务器资源管理器.
2)右键点击数据连接"并选择添加连接"
3)在随后的对话框中,选择您的数据源和数据库,指定安全信息,然后按测试连接".按钮.
4)连接正常后,按确定"
5)在服务器资源管理器"窗格中突出显示您的数据库,然后查看属性"窗格.将显示一个连接字符串的工作示例,您可以将其复制并粘贴到您的应用程序或配置文件中.
Try setting up a connection in VS with the Server Explorer pane:
1) Open Server Explorer.
2) Right click "Data connections" and select "Add connection"
3) In the dialog that follows, select your DataSource, and database, specify the security info, and press the "Test connection" button.
4) When the connection works, press "OK"
5) Highlight your database in the Server Explorer pane, and look at the Properties pane. A working example of the connection string will be shown, which you can copy and paste into your app or config file.




如果您的两台计算机都在网络中,则可以在SQL连接的连接字符串中使用SQL Server的SQL身份验证,并在正常开发时继续应用程序.

问候,
达山.
Hi,

If both of your machines are in network then you can Use SQL authentication of SQL Server in the connection string of the SQL Connection and continue the application as you develop normally.

Regards,
Darshan.


这篇关于使用远程sql数据库连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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