I have a cross-platform project running UiPath Studio Community 2023.4.0. In the project, I use UiPath.Database.Activities (version 1.8.2) to connect to SQL Server. I use the “Run Query” activity with the SQL statement ‘SELECT * FROM [school].[dbo].[student]’. When running locally, the robot works fine. However, when I publish it to the Tenant and start a job within a Process to run the robot under a Docker container, I encounter the error:
Incorrect syntax near ‘Studio’.
Microsoft.Data.SqlClient.SqlException: Incorrect syntax near ‘Studio’. at UiPath.Database.Activities.ExecuteNonQuery.HandleException(Exception ex, Boolean continueOnError)
at UiPath.Database.Activities.ExecuteNonQuery.ExecuteInternalAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken)
at UiPath.Database.Activities.AsyncTaskCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
— End of stack trace from previous location —
at UiPath.Executor.BaseRunner.EndExecute(IAsyncResult result) in /home/vsts/work/1/s/Robot/UiPath.Executor.Core/WorkflowRuntime.cs:line 311
at UiPath.Executor.InProcessRunner.EndExecute(IAsyncResult result) in /home/vsts/work/1/s/Robot/UiPath.Executor.Core/WorkflowRuntime.cs:line 402
at UiPath.Core.Activities.ExecutorInvokeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
Thanks in advance!