Merge data


Author
Message
Chan
Chan
Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
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

StrataFrame Team
S
StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
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.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search