Calling convention: CIP_SQL("DBName": String, "SQLStatement": String; HasResult:Boolean): Variant
Description: Executes SQL on the named connection or on the current connection when DBName is empty. Named SQL parameters are resolved from the current DBForm, parser variables, runtime variables, or current userscript locals.
Parameters:
DBName: connection name; an empty string selects the current connection.
SQLStatement: SQL statement or script.
HasResult: optional execution hint. True opens a result set; False executes without a result set.
Returns: Variant: normally the first column of the first row; NULL for an empty result or execute-only operation. In an array-valued expression context, returns the first column as a Variant array.
Availability: Default; the selected connection must be visible to the current user.
Example:
UserCount := CIP_SQL("", "SELECT COUNT(*) FROM OEE_USER", True);