Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

SQLTraceOn

  • Last UpdatedJul 18, 2023
  • 1 minute read

Turns on a debug trace. Use this function to begin tracing function calls that are made to the database. The information is written to TraceLog.dat file (the strFileName argument is currently ignored). The trace can be turned on globally for all connections or for a specific connection.

Note: Currently the SQL tracing functionality uses the standard SCADA logging mechanism. All SQL traces are Information logs and can be written to TraceLog.dat file only if appriopriate logging ini parameters are set respectively, for example [Debug]SeverityFilterMode.

This function can be called in the foreground or background.

Syntax

SQLTraceOn(sFileName, hSQL, nTraceLevel)

sFileName:

The output file name for the debug trace. Currently ignored.

hSQL:

The handle to the DB connection object: INVALID HANDLE - The trace is activated for all DB connections (default), otherwise - The trace is activated for this specific DB connection object.

nTraceLevel:

Defines the level of details written to the trace file. The following values are allowed:

0 - as per 1, but without values (default).

1 - the highest level of details including values of read cells

Return Value

0 (zero) if successful, otherwise an error number is returned. (For details of the 307 error code, call the SQLErrMsg function).

SQLErrMsg, SQLTraceOff

Example

See SQLFieldInfo

See Also

SQL Functions

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in