Please enable JavaScript to view this site.

A-Shell Consolidated Reference

Updated (opflags) July 2019

xcall SQL, SQLOP_INIT_LIB, cmdhdr

The SQLOP_INIT_LIB function initializes the SQL library and is required prior to any other operations for a given database type (MySQL, ODBC, etc.).

Parameters

cmdhdr (ST_SQL_CMDHDR), [in/out]

The fields of interest to this opcode in the cmdhdr structure (defined in SQL.DEF) are listed below.

Field

Dir

Notes

handle

n/a

 

dbmsconid

in

DBMS Connector ID

opflags

in

SQLCONF_TRACE=1 flag activates tracing of ASQL operations in ashlog.log

cmdarg1,2*

n/a

 

rc

out

return code (0 = ok, see SQLERR_xxx)

rcext

out

extended return code (dbms err if rc = SQLERR_DBMSERR)

info1,2

n/a

 

sqlstate

n/a

 

reshdl

in

If not zero, determines maximum number of result sets to support at one time. Default is 4.

psthdl

in

If not zero, determines maximum number of prepared statements to support at one time. Default is 16.

 

Notes

At the end of the session, use SQLOP_CLOSE_LIB to close the library and release the resources.

History

2012 January, ashmysql connector 1.4.132: SQLCONF_TRACE flag added. Note that setting the SQLCONF_TRACE flag in the opflags field is equivalent to defining an environment variable ASQLTRACE=1.

2012 January, ashmysql connector 1.4.130: SQLOP_INIT_LIB and SQLOP_CLOSE_LIB can now be nested. See History under SQLOP_CLOSE_LIB for further details.