RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TSQLConnection.ConnectionName Property

Names the connection configuration.

Pascal
property ConnectionName: string;
C++
__property AnsiString ConnectionName;

Set ConnectionName to use a named connection configuration. Setting ConnectionName automatically sets the DriverName and Params properties to reflect the driver and connection parameters stored under that name in the dbxconnections.ini file.

Tip: You can define new connection configurations using the Connection Editor. To launch the Connection Editor, double-click on the TSQLConnection component.
If you are using a different dbxconnections.ini file at design time than the one used at runtime, you can force the configuration to reload at runtime by setting the LoadParamsOnConnect property or calling LoadParamsFromIniFile. In most cases, however, this is unnecessary, because the DriverName and Params property settings that are loaded when you set ConnectionName are saved in the form file. In fact, unless you set LoadParamsOnConnect or call LoadParamsFromIniFile, you do not need to deploy the dbxconnections.ini file with your application even if you are using named connections. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!