Skip to main content

%SYSTEM.SQLGateway

abstract class %SYSTEM.SQLGateway extends %SYSTEM.Help

The %SYSTEM.SQLGateway class provides an interface for managing Gateway connections.

You can use it via the special $system object:

  Do $system.SQLGateway.DropAll()
  

Method Inventory

Methods

classmethod DropAll() as %Status
Drop all open connections and unload the SQL Gateway library.
classmethod DropConnection(nm) as %Status
Disconnect a JDBC or ODBC connection

nm - connection name

classmethod GetJDBCConnection(cname) as %Binary
Connect to a previously defined JDBC Gateway connection.

It returns an empty string if the connection attempt was unsuccessful.

nm - connection name

classmethod GetODBCConnection(nm, timeout, legacy="") as %Binary
Connect to a previously defined SQL Gateway ODBC connection.

It returns an empty string if the connection attempt was unsuccessful.

nm - connection name
timeout - timeout
legacy - legacy mode

classmethod SetAllODBCConnectOption(option, vparm) as %Status
Set the given integer option for all open connections

option - option to set
vparm - value associated with option

classmethod SetAutoCommit(ac) as %Status
Set the autocommit mode for all open connections

ac = { 0 - AUTOCOMMIT OFF, 1 - AUTOCOMMIT ON}

classmethod TestConnection(nm, timeout=0, verbose=1, error="") as %Status
Test a previously defined SQL Gateway connection.

It writes the diagnostic ouput to a current device.

nm - connection name
timeout - timeout (only relevant for ODBC connections)
verbose - setting to a non 0 value will cause the diagnostic output to the current device
error - output variable for passing back an error if it occurs

classmethod Transact(ttype) as %Status
Request a commit or rollback operation for all active operations on JDBC or ODBC connections.

type = { 0 - SQL_COMMIT, 1 - SQL_ROLLBACK}

Inherited Members

Inherited Methods

FeedbackOpens in a new tab