Data.SqlExpr.TSQLConnection.ConnectionName

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property ConnectionName: string read GetConnectionName write SetConnectionName;

C++

__property System::UnicodeString ConnectionName = {read=GetConnectionName, write=SetConnectionName};

Properties

Type Visibility Source Unit Parent
property published
Data.SqlExpr.pas
Data.SqlExpr.hpp
Data.SqlExpr TSQLConnection

Description

Names the connection configuration.

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.

See Also