I’ve encountered a bug whilst working with UiPath 2018.1.2. When running the ‘Execute Query’ activity multiple times the UiRobot stops working. I’ve recreated the same workflow in UiPath 2017 and no such error occurs. Also, the same version of UiPath.Database.Activities was used in each case, leading me to think this is a bug with UiPath 2018 itself and not the activity.
To recreate this:
Create a workflow that contains the 'Execute Query" activity.
Set the connection string to:
- Create a string variable called excelFilePath that is the file path of a .xlsx excel file (with a sheet called Sheet1)
- Set the ‘ConnectionString’ parameter to:
“Provider=Microsoft.ACE.OLEDB.12.0;Data Source=” + excelFilePath + “; Extended Properties=”“Excel 12.0 Xml;HDR=NO”";"
- Set the ‘ProviderName’ parameter to: “System.Data.OleDb”
- Set the ‘SQL’ parameter to: “SELECT * FROM [Sheet1$]”
- Now, create a loop that runs this activity more than once.
A workaround for this that I’ve found is to run the activity in it’s own workflow checking the ‘isolated’ property.