Studio DBConnector action returns FAILURE on simple SELECT

Problem: The DBConnector action fails on a basic lookup. The connection profile’s active, but the script errors out.

Code:

ASSIGN QueryStr = "SELECT NAME FROM USERS WHERE ID = " + Session.Input.Id;
DBConnector.Execute(ConnectionId: "CXONE_DB", Sql: QueryStr, Result: LookupData);

Error: Status returns FAILURE. Trace log doesn’t show syntax errors, just a blank result object.

Question: The SQL runs fine in the database client. Connector seems to ignore the Sql parameter. Checking timeout settings.

The blank result usually means the SQL string is malformed or the connection profile lacks read permissions for that specific table. Try wrapping the ID in quotes to prevent SQL injection issues and check the audit logs for permission denials.

SELECT NAME FROM USERS WHERE ID = '#{Session.Input.Id}'