Can not figure out the problem with Execute query for SQL

datatable
studio
sql

#1

Hi all,

I am trying to select data from a SQL database. For a test purpose I am using a simple select for one row output. I have followed the steps from the knowledge and was able to successfully connect to database. When I try to execute the query I get the following error message:
Execute query : This location is marked as const, so its value cannot be modified.


Error Message:
Main has thrown an exception

Source: Execute query

Message: This location is marked as const, so its value cannot be modified.

Exception Type: InvalidOperationException

System.InvalidOperationException: This location is marked as const, so its value cannot be modified.
at UiPath.Database.Activities.ExecuteQuery.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)

Any help would be much appreciated.

Regards,
Tanya.


How to ask a good question?
#2

@Tanya looks like you got issues in variable deceleration based on your error message.
If you could able to share your WF then i will try to help you.


#3

Sure , what is wf?


#4

Work Flow


#5

image


#6

image


#7

@ddpadil @aksh1yadav guys could you please help Tanya


#8

Hi , I am quite new to the forum and seeking help with an issue. I have posted my problem on the forum but so far I am not getting any help. I did my research for similar issue and found nothing on it except for one post with a similar error which also has no response on it, too. I completely understand that no one i obligated to respond. Can you pleas advise?


#9

i just replied your question


#10

Let me know if you need more information.


#11

@ddpadil @aksh1yadav @rkelchuri

This was resolved by removing connect activity from my wf.
I set up connection directly in the execute query activity and it worked.