Calling convention: CIP_JSON_SQL("DBName": String, "SQLStatement": String): NativeInt
Description: Executes a query on the selected database and serializes its result set to a managed FireDAC JSON object.
Parameters:
DBName = Registered database connection name. Use an empty string for the current connection.
SQLStatement = Non-empty SQL statement. Named SQL parameters are resolved from the current form, MathParser variables, runtime variables, or user-script variables.
Returns: NativeInt pointer to the managed JSON object. An empty result set returns a managed empty JSON object. Release the returned top-level object with CIP_JSON_FreeObject.
Availability: Default. The selected database connection must exist and be visible to the current user.
Example:
JSONSQLObj := CIP_JSON_SQL("", "SELECT * FROM OBJECTS");
try
CIP_AddScreenLog("Rows: " + VarToStr(CIP_JSON_GetDBRowCount(JSONSQLObj)));
finally
CIP_JSON_FreeObject(JSONSQLObj);
end;