Issue while using Database Insert Activity

database

#1

Hi,

I am using Database Insert activity to insert the datatable values to database table, but it is throwing an error like “cannot create and populate list type System.data.sqlclient.sqlerrorcollection”

Please help to solve this issue.

Thanks.


Exception while inserting datatable into database using execute non query
#2

Same Problem while i am inserting the records to database using insert activity
Can someone fix this issue


#3

Can we have the insert script, what you are passing.


#4

Hi @siva,

Try to see the output screen, there you will get to know what exact the error is.

Regards,
Jasnoor


#5

Try adding the headers similar to the database column names, it worked in our case.


#6

also make sure the columns you are inserting match the types on the database. I had an issue testing the insert function when inserting strings as the database table was set as nchar. Changing to varchar resolved


#7

hi All,
i managed to resolve the issues of Insert activity by tracing the SQL.I am using postgreSQL
the rules are:
column names in the database must match the datatable.
column names must be lower case (this is because postgreSQL adds a delimiter if the column names has capital letters) -> dont know if there is a workaround or config for that.
add a primary key to the table.

this should then work


#8

hi ezharul.ansari
i m also getting the same error while extracting data from data table and inserting into database
DataBaseFlowchart1.xaml (20.1 KB)
please have a look

thanks in advance