Data.Win.ADODB.TADOConnection.Open

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type:
procedure
function
Visibility: public
Source:
Data.Win.ADODB.pas
Data.Win.ADODB.hpp
Unit: Data.Win.ADODB
Parent: TADOConnection

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(){ Data::Db::TCustomConnection::Open(); }

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