DataSet.GetChanges - Save the updated record in a different table than the source one
Posted
by John Dev
on Stack Overflow
See other posts from Stack Overflow
or by John Dev
Published on 2010-06-04T15:16:54Z
Indexed on
2010/06/06
22:42 UTC
Read the original article
Hit count: 120
I'm doing operation on a dataset containing data from a sql table named Test_1 and then get the updated records using the DataSet.GetChanges(DataRowState.Modified) function. Then i try to save the dataset containing the updated records on a different table than the source one (the table is names Test and has the same structure as Test_1) using the following statement: sqlDataAdapter.Update(changesDataSet,"Test");
I'm getting the following error : Update unable to find TableMapping['Test'] or DataTable 'Test'
I'm new to ado.net and don't even know if it"s something possible. Any advice is welcome.
Just to provide a bit of context. ETL jobs are importing data in temp table with same structure as the original but with _jobid suffix. Right after a rule engine is doing validation before updating the original table.
© Stack Overflow or respective owner