This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.

For information on migrating to InterSystems IRIS, see Why Migrate to InterSystems IRIS?


The methods in this class are used by the SQLRegression class to execute SQL files using an ODBC SQL Gateway connection and return results in a stream. They are subject to change, and not intended to be called directly.

Method Inventory


parameter Password = SYS;
Specify password for odbc database connection
parameter Port;
Specify Cache Super Server Port for odbc database connection
parameter Url =;
Specify url for odbc database connection
parameter Username = _system;
Specify username for odbc database connection


classmethod getODBCDSN(dsn As %String = "") as %Status
Find or Add ODBC DSN dsn at System level
classmethod getODBCGateway(ByRef gcn As %String = "", ByRef dsn As %String = "") as %Status
Add or verify Gateway Connection
  1. gcn Gateway Connection Name will be verified or added
  2. dsn if value passed in we will add it to gcn if missing, but will not verify it at lower level if you need to, call getODBCDSN first to create a dsn at the lower level and pass the name to this function
classmethod processLog(ByRef fnderr As %ListOfDataTypes, ByRef log As %Stream) as %Status
Return any errors found in log in fnderr list
classmethod processORSToStream(clist As %List, rlist As %List, err As %String = "", ByRef output As %Stream, verbose As %Boolean = 0, space As %Boolean = 1) as %Status
Write ResultSet out to Stream If verbose=1 then also write column information to Stream with ResultSet space must be 1 for SQLRegression and SQLDataRegression to correctly process tuples in each resultset row.
classmethod runODBCSQL(sqlfilename As %String, ByRef dsn As %String = "", verbose As %Boolean = 0) as %Stream
Connect to ODBC and run SQL from sqlfilename in ANY namespace and return result as %Stream. ODBC DSN is dynamically created by modifying the built-in "User" DSN
classmethod runODBCSQLStatement(sql As %String = "", ByRef dsn As %String = "", verbose As %Boolean = 0, Username As %String = "", Password As %String = "", ByRef RowCount As %Integer) as %Stream
Connect to ODBC and run SQL statement in ANY namespace and return result as %Stream. ODBC DSN and SQL Gateway Connection are created if they don't exist, or used if they do. DSN and Gateway name is " " Username and Password can be passed as argument or as class parameter If verbose is 1 the column information is included in the resultset.

Inherited Members

Inherited Methods