Generic Unexpected Exit Code Error Thrown During UiPathDatabaseActivities ExecuteQueryCall

When using an "Execute Query" instance, the query returns more than 20 rows the process exits and throws a generic error. If the number of rows returned are reduced, then it succeeds.

Issue Description

A generic "unexpected exit code" error was thrown during UiPath.Database.Activities.ExecuteQuery call.

Fetching 10, 20 or 50 records is possible while trying to fetch 100 or above records results in an error.

Root Cause

This is caused by the AWS Redshift ODBC 64-bit driver crashing from a memory leak.

Resolution

  • Check the string connection to the database activity. Make sure it is correctly formatted as follows:

( Driver={Amazon Redshift ODBC Driver (x64)};server=accounting-production.cine muhflnd3.us-west-2.redshift.amazonaws.com;port=5439;database=prod;uid= + dataWarehouse Credential Username + ;pwd= + new System.Net.NetworkCredential(, dataWarehouse Credential Password).Password )

  • Install the Redshift ODBC driver version 2.0.0.8.