matsnake86 matsnake86 - 6 months ago 36
C# Question

Merging tables from different access DB

I am trying to merge data from a table access db to another identical table into another access db.

I'm working with table adapters and controls which are bound to a binding source.

I can successfully import the data I want into a temporary data table and merge it with the data table bound to the control (a devexpress grid view).

The grid updates properly, but I am not able to actually save changes made to the dataset.
What am I missing?

Tried this code:

this.myDs.myDT.Merge(importedDT); //works fine the grid actually updates
this.mytableadapter.adapter.update(this.myDs.myDT); //no update at all on db


Have you considered a query?

 SELECT * FROM [;DATABASE=Z:\Path\aDB.accdb].bTable

This will insert data from a second database into the database table in the connection that you run against.