RAD Studio VCL Reference
TADOConnection.Open Method

Initiates a connection to a database.

procedure Open(const UserID: WideString; const Password: WideString); overload;
__fastcall Open(const BSTR UserID, const BSTR Password);

Call Open to initiate a connection to the database specified in the ConnectionString property. 

UserID and Password parameters for Open can be optionally used to pass the user ID and login password to the database server at the same time the request is made to connect.

ADOConnection1.Open('Joe Sixpack', 'SecretWord');


ADOConnection1->Open("Joe Sixpack", "SecretWord");

Alternately, this login information may be passed in the value in ConnectionString

When explicitly passing login information through either the Open method or the ConnectionString, the LoginPrompt property should be set to false to prevent an unnecessary login dialog. 


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