Issue with "Update From Datatable" In openRPA

Hi I am new to openRPA & I need assitance, how to use Update from Datatable flow in OpenRPA workflow…As per manual I did but i am encountering error.


Dynamic SQL generation for the DeleteCommand is not supported against a SelectCommand that does not return any key column information."

I am pasting ss for more reference

I am trying to read table data from mssql database and I want to send data to postgresql. So I have taken database Scope to open database connection then using execute query i am reading data from table “api_test” and storing it to data1. Now Again I have open the database connection for Postgresql and trying to insert data1 into Pgsql table “api_test1” using Update from datatable". but I am encountering error which i have mentioned above. Can any one help me to understand the approach to get it work???

DataTable is transactionel. IT keeps track on what was added, updated and removed, and use that toward the database …
The idea being you get some data from a SQL Server, and all the changes you make to your local copy can then be “syned” to the database using Update From DataTable.
When you get the rows to start with, those will be in “un modifyed” state, so if you try and commit those to another SQL server, nothing will happen. You can use “SetAllRowsState” to set all rows state to “Added” to get them inserted in the other SQL server table.
Now, that is not your issue here, the error simply means that the primary key used when getting the datatable does not exists on the table you are trying to insert into.
I cannot help you with 3rd party tools/applications, so you will need to consult the Postgreesql dokumentation on how to create a primary key ( also called clustered index on MSSql )

1 Like

Thank you Allan, it worked. I added one primary key column to both database table and did as you suggested and it worked.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.