Language Reference Guide : 4. System Classes : DBSessionObject Class : Connect Method
 
Share this page                  
Connect Method
The Connect method opens a new database connection for the application.
This method has the following syntax:
integer = DBSessionObject.Connect(database = varchar(256),
          [flags = varchar(256)])
The DBSessionObject must have a State of DS_DISCONNECTED (see State Attribute) and must be the session object associated with the session you want to open.
This method has the following parameter:
database
Identifies the database to which the session is connecting. The optional flags parameter lets you specify up to 12 flags for the session. You can use any flag that is acceptable to the sql command and applicable to the DBMS.
For a list of these flags, see the sql command description in the Programming Guide.
This method returns ER_OK if it is successful. Descriptions of system constant values and their numeric equivalents are listed in Error Codes.