Hi Bob,
thanks for replying.. Sorry for cross posting, but wasn't sure which group
to post to...
Anyway...
The databases will look something like this:
Database1.MDB
Table1
fields (Won't know what these are at runtime)
Database2.MDB
Table1
fields (Won't know what these are at runtime)
ExtraField (Will know what this is at runtime)
I'm using a datareader to read an Access Table, using a "Select * from
TableName". I have no idea of what the structure of the table is, so this
is why it is being read into a datatable.
The destination table is exactly the same, except it would have an extra
field. Which I can update separately.
I could clone the datarow, which isn't a problem. The problem is
updating/inserting the row into the destination table. Am I right in
thinking that I would need to create the SQL Query to do this, by reading
the schema for the table to get the field names and types. Then execute it.
Or is there a simpler way of doing this..
Many thanks
As for your question, I'm not sure I understand the problem. Isn't it just
a matter of cloning the relevant datarow and appending it to the Rows
collection of the other datatable (assuming the schema is the same of
course ... ). Then sync the datatable with the database the same way you
normally would after doing an update to the datatable.