Data.Win.ADODB.TADOConnection.Open

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure Open(const UserID: WideString; const Password: WideString); overload;

C++

HIDESBASE void __fastcall Open(const System::WideString UserID, const System::WideString Password)/* overload */;
inline void __fastcall  Open(void){ Data::Db::TCustomConnection::Open(); }

Properties

Type Visibility Source Unit Parent
procedure
function
public
Data.Win.ADODB.pas
Data.Win.ADODB.hpp
Data.Win.ADODB TADOConnection

Description

Initiates a connection to a database.

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.

See Also