trace



Registers an user callback method that can be used for tracing. The callback method is invoked at various times when an SQL statement is being run by step .

Arguments: The arguments are:
callBackObj [required] An instantiated object with a method that will be invoked for tracing. However, this argument can also be .nil to indicate that any installed trace hook is to be removed.
mthName [optional] The method name that will be invoked during a call back. By default, the method invoked will betraceCallBack(). However, the user can specify an alternative method if desired. This argument is ignored when thecallbackObjargument is .nil.
userData [optional] This can be any Rexx object the user desires. The object will be sent as the second argument to the trace callback method when it is invoked. This argument is ignored when the callbackObj argument is .nil.
Return value: TheuserDataargument to a previous invocation of thetracemethod on the same database connection, or .nil if there has not been a previous invocation or theuserDataargument was not used on the previous invocation.
Remarks: By default, there is no trace callback installed. There can only be one trace callback per database connection. Setting a new trace callback automatically clears any previously installed callback. The callback method is invoked at various times when an SQL statement is being executed by either step or exec . The trace callback is invoked with the SQL statement text as the statement first begins executing. Additional trace callbacks might occur as each triggered subprogram is entered. The callbacks for triggers contain a SQL comment that identifies the trigger.
Details: The functionality of thetracemethod is similar to that of the SQLite sqlite3_trace API.