问题
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.
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.
But how do I tell the ADO connection that it needs to connect through that source IP?
回答1:
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.
来源:https://stackoverflow.com/questions/13727523/specify-source-ip-for-ado-connection-from-delphi-to-mysql