StrataFrame Forum

Merge data

http://forum.strataframe.net/Topic6928.aspx

By Chan - 2/18/2007

Hi,

I have temporary BO to allow user to edit records which is in un-normalized format. Then, I want to add these records back to normalized table - ParentTable and ChildTable.

After saved,User may want retrieve and edit/delete records in this temporary BO. Any simple way to "merge" back the records to database? Does BusinessLayer.MergeDataTable() do what I need?

Thank you

By StrataFrame Team - 2/19/2007

The only way to automatically do what you're talking about is to create an updatable view (either an indexed view that can be updated, or stored procedures to update, insert and delete records from the view) and build a business object from that view.  Then, you can add new records to the business object and save them.  Otherwise, you'll have to hand-code the transfer of the data back into the separate child & parent business objects. 

The MergeDataTable() method is used to merge two separate data tables that have the same structure down to one DataTable, removing conflicting records by testing the PK values.