Incerting to Access DB fails when changes to datatabel before inserting

Hello,

I have two tables in Access (Tidreg and MonthlyOutputfile). The process is:

  1. Get the data out from Tidreg (Access DB) (Get the connection as well)
  2. Copy dtTidreg to dtMonthlyOutputfile,
  3. Add 3 columns and removing the key column from dtMonthlyOutputfile ,
  4. Adding data to the new columns in dtMonthlyOutputfile
  5. Inserting dtMonthlyOutputfile to Access DB (MonthlyOutputfile)

Everything works fine if I do not do any changes to dtMonthlyOutputfile in stage 4.

But if a do a change to whatever column and row (string, double or boolean), I get the following error “Insert MonthlyOuput To DB: Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information.”

If I only add default values to the new columns to ensure that data is in the fields the import works as well.


TestExporOutputfile.xaml (13.1 KB)

I really hope you can help me
Thanks in advance

A bit late but it could help someone…

You need to call AcceptChanges method of the datatable prior using the Database Insert activity
image