Promotic

Connect - method of the PmaDatabase object

Description:
It is used for the connection of the database defined by the Type and Database properties to the application. A query to the data of the table, eventually a SQL statement, defined by the Table property (or OpenSQL), isn't proceeded (the table hasn't been opened yet).
Syntax:
Boolean Connect()
Note:
The method doesn't open the table of the database.
After calling this method, the Execute and ExecuteSQL methods can be called, the other methods of this object can't be called (only after opening the table for example by the Open method).

The operation is understood as the connection of the database when the application is connected to the database. By this operation an image of the table data (eventually the SQL query) isn't created in the storage area of the application - i.e. the table isn't open nor the SQL statement is executed. It corresponds to calling the Connect method.
After connection of the database the Execute/ExecuteSQL methods that are using the SQL language, can be called.

Opening the table means the operation when a set of rows corresponding to the table (eventually to the SQL query), is created in the storage area of the application. It corresponds to calling the Open method. On opening the table at first the database is automatically connected.
See also:
- PmaDatabase.Open (method)
Example:
JavaScriptVBScriptSelect and copy to clipboard

var oDb = pMe.Pm("/Database0");
var sSQL = "........";
oDb.Connect();

// the database is connected. The Execute/ExecuteSQL methods can be called.
oDb.ExecuteSQL(sSQL);
// ...

// Opening the table. All other methods can be called.
oDb.Open();
// ...

// Close the table and disconnect the database
oDb.Close();
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.