AnyDAC
ContentsIndexHome
PreviousUpNext
TADCustomConnection.Open Method (String, String, String)

Open connection to the database, using specified connection parameters, user name and password.

Group
Links
Parameters 
Description 
const AConnectionString: String 
A ';' separated list of the <name>=<value> parameter pairs. 
const AUserName: String 
Optional user name. 
const APassword: String 
Optional password. 

Call Open method to open connection to a DBMS, using specified connection string and optional user name and password. The method is shortcut to filling of Params property and setting Connected to True. 

AConnectionString string value may be one of two forms:

  • it is a ';' separated list of the <name>=<value> connection definition parameter pairs. If connection string contains User_Name and/or Password parameters and AUserName and/or APassword arguments are specified, then they will override corresponding parameters in connection string.
  • it is a connection definition name.
procedure Open(const AConnectionString: String; const AUserName: String; const APassword: String); overload;
 ADConnection1.Open('DriverID=Ora;Database=ORA_920_APP', 'addemo', 'a');
What do you think about this topic? Send feedback!