指定从Delphi到MySQL的ADO连接的源IP [英] Specify Source IP for ADO connection from Delphi to MySQL

查看:91
本文介绍了指定从Delphi到MySQL的ADO连接的源IP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Delphi应用程序正在使用tAdoConnection连接到MySQL数据库。
我的客户有一台计算机,该计算机通过网络与数据库服务器有两个连接。一个是有线的,另一个是无线的。因此,运行该应用程序的计算机在同一网络上具有两个IP地址。

My Delphi application is connecting to a MySQL database using tAdoConnection. My customer has a machine that has two connections to the database server through the network. One is wired, the other wireless. So the machine running the application has two IP addresses on the same network.

我的问题是这台机器上的无线连接不稳定。因此,我想强制通过有线连接进行数据库连接。我知道我要使用的源IP地址。

My problem is that the wireless connection on this machine is not stable. So I want to force the database connection to be made through the wired connection. I know the source IP address that I want to use.

但是我如何告诉ADO连接它需要通过该源IP连接?

But how do I tell the ADO connection that it needs to connect through that source IP?

推荐答案

您不需要在ADO中查找此功能,可以使用绑定了外部应用程序来完成此类任务您的ADO应用程序连接到特定的网络接口(或网络连接)。我过去使用 ForceBindIP

You don't need look for this feature inside ADO, this kind of task can be made using an external application which bind your ADO app to a specific network interface (or network connection). I've done this in the past using ForceBindIP.

这篇关于指定从Delphi到MySQL的ADO连接的源IP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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