RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TDBXConnectionFactory.GetConnection Method (TDBXProperties)

Creates a TDBXConnection instance for connecting to a database

Pascal
function GetConnection(const ConnectionName: WideString; const UserName: WideString; const Password: WideString): TDBXConnection; overload;
function GetConnection(ConnectionProperties: TDBXProperties): TDBXConnection; overload;
C++
__fastcall TDBXConnection GetConnection(const BSTR ConnectionName, const BSTR UserName, const BSTR Password);
__fastcall TDBXConnection GetConnection(TDBXProperties ConnectionProperties);

This method creates a TDBXConnection instance for connecting to a database. 

If the UserName parameter is an empty string, then ConnectionName's associated TDBXProperties setting for TDBXPropertyNamesUserName is used.  

If the Passwordparameter is an empty string, then ConnectionName's associated TDBXProperties setting for TDBXPropertyNamesPassword is used.

Note: Call TDBXDriver.Freewhen the TDBXConnection is no longer needed.
 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!