The ConnectionDefs property is a powerful tool that can be used to make your connections management simple and flexible, with the possibility of persisting and transport your connection’s parameters whenever you want, using these transportable files you can load and navigate between previously configured connections on self-contained .INI files, thus, you don’t have to worry about load and save settings on settings files yourself, this is all abstracted within connectionDef’s functions.
ConnectionDefs requires just the actual native FireDac installed.
To use the ConnectionDefs function just add the TFDManager on your code, after that you can:
Create connection definition on fly:
[crayon-6729f8b83b7bb752410250/]
Connect to database:
[crayon-6729f8b83b7c3921994506/]
Delete connection definition:
[crayon-6729f8b83b7c4557914827/]
Set connection definition file name:
[crayon-6729f8b83b7c5805958447/]
Load connection definition file:
[crayon-6729f8b83b7c6592597067/]
Add connection definition:
This is similar to create connection definition. The difference is that you may create a connection definition after loading other connection definitions from the file.
Clone Connection definition:
[crayon-6729f8b83b7c7463179801/]
You can find Delphi code samples in GitHub Repositories.
Check out the full article in the DocWiki about the ConnectionDefs.