Jan 22, 2019 TFDConnection.Params.Server is not a valid published property in Delphi XE7. How can I set the server location programmatically? I have 2 MySQL servers (test and production) that are at different ip's and based on what I am doing in the application, I want to easily switch back and forth between the 2 servers. Oct 21, 2012 Re: Driver Installation Failed: Could not find the MODEM device for this driver Hi, If you are using a modem with your computer, please ensure it is connected to your computer and is getting detected in 'Device Manager'.
TFDConnection.Params.Server is not a valid published property in Delphi XE7. How can I set the server location programmatically? I have 2 MySQL servers (test and production) that are at different ip's and based on what I am doing in the application, I want to easily switch back and forth between the 2 servers.
2 Answers
Please read the documentation, it tells you exactly how to define a FireDAC connection for MySQL:
You would specify the DB server as part of a Connection Definition:
Connection Definitions can be defined in an external .ini file, which you can then reference in the TFDManager.ConnectionDefFileName
property, or load dynamically using the TFDManager.LoadConnectionDefFile()
method.
Or dynamically using the TFDManager.ConnectionDefs
property:
Either way, you can then tell TFDConnection
which Connection Definition to use to reach each database when needed:
Alternatively, you can specify the connection parameters directly in the TFDConnection.Params
property if you do not want to pre-define separate connection definitions:
This works for me. Add any additional parameters as needed