DBOPEN
9.0, PLBCMP GUI or PLBLinux Only
The DBOPEN instruction opens a new SQL statement for the database connection. The instruction uses the following format.
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
dbstatement
Required. A DBSTATEMENT variable defining the SQL statement.
dbfile
Required. A DBFILE variable defining the database associated with the connection.
cursor
Optional. A Numeric Variable, literal, or decimal number indicating the type of cursor for this statement.
Flags Affected: none
Note the following:
The DBFILE variable must be already connected to a database.
Multiple DBSTATEMENTs can be open on one DBFILE at the same time.
The supported cursor types are as follows:
|
Value |
Function |
|
0 |
Uses a forward-only cursor and a static copy of a set of records. Additions, changes, or deletions by other users are not visible. The DBFETCHP instruction is not allowed. This is the default cursor type if the CURSOR keyword is not specified. |
|
1 |
Uses a keyset cursor. Changes, and deletions by other users are visible. The DBFETCHP instruction is allowed. |
|
2 |
Uses a dynamic cursor. Additions, changes, and deletions by other users are visible. The DBFETCHP instruction is allowed. |
|
3 |
Uses a static cursor. A static copy of a set of records. Additions, changes, or deletions by other users are not visible. The DBFETCHP instruction is allowed. |
See Also: Example Code, SQL Instructions
![]() |