Skip to main content

%SYSTEM.SQLGateway

Class %SYSTEM.SQLGateway Extends Help [ Abstract, LegacyInstanceContext, System = 4 ]

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

You can use it via the special $system object: Do $system.SQLGateway.DropAll()

Methods

TestConnection

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

DropConnection

ClassMethod DropConnection(nm) As %Status

Disconnect a JDBC or ODBC connection

nm - connection name

GetJDBCConnection

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

DropAll

ClassMethod DropAll() As %Status

Drop all open connections and unload the SQL Gateway library.

GetODBCConnection

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

SetAllODBCConnectOption

ClassMethod SetAllODBCConnectOption(option, vparm) As %Status

Set the given integer option for all open connections

option - option to set
vparm - value associated with option

SetAutoCommit

ClassMethod SetAutoCommit(ac) As %Status

Set the autocommit mode for all open connections

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

Transact

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}