SQL Instructions


PLBCMP GUI and PLBLinux Only

 

Structured Query Language is an interface that allows PL/B programs access to many other databases, both relational and non-relational. Three interfaces are provided.

 

  1. Active Data Objects (ADO), MySQL, and Open DataBase Connectivity (ODBC) for Windows.

  2. MySQL for Linux and Linux

  3. SQLite

 

The database verbs have been enhanced to allow multiple connections to different database engines at the same time. In addition, the user's application can have multiple active SQL statements that provide different result data sets using multiple DBSTATEMENT variables for a single connection of a DBFILE variable.

 

Before an ODBC database may be accessed from a PL/B program, you must first install the administrative programs. These programs provide the ability to add or delete database drivers and determine that databases are accessible via ODBC. These Windows programs are available from the database supplier and are not distributed by Sunbelt.

 

PL/B:Linux users of MySQL databases will not require any additional drivers. The PLB_SQL keyword defines the SQL supporting library used by the runtime. The library must be in the PLB_SYSTEM folder. The 'sunmysql.so' library is supplied by Sunbelt for MySQL.

 

The SQL instructions are not available when using the PLBCE runtime.

 

The following instructions support SQL:

 

DBBREAK

Halt an executing query.

DBCLEAR

Clear any data place by a DBSEND.

DBCLOSE

Close a database statement.

DBCONNECT

Connect to a remote database.

DBDISCONNECT

Disconnect from a remote database.

DBERROR

Obtain error information from a remote database.

DBEXECUTE

Execute a query on a remote database.

DBFETCH

Return one row of a query result.

DBFETCHP

Return the previous row of a query result.

DBFILE

Declare working storage for a database.

DBOPEN

Open a database statement.

DBPREPARE

Prepare an SQL statement.

DBRESULT

Return the number of affected rows by a DELETE, INSERT, or UPDATE operation.

DBSEND

Send all or part of a query to a remote database.

DBSTATE

Determine the state of query.

DBSTATEMENT

Declare working storage for a database statement.

DBTRANSACTION

Provide access to transaction support on a database connection.

 

 



PL/B Language Reference SQLite