Copying Data from one BO to another BO


Author
Message
Robin J Giltner
Robin J Giltner
Advanced StrataFrame User (537 reputation)Advanced StrataFrame User (537 reputation)Advanced StrataFrame User (537 reputation)Advanced StrataFrame User (537 reputation)Advanced StrataFrame User (537 reputation)Advanced StrataFrame User (537 reputation)Advanced StrataFrame User (537 reputation)Advanced StrataFrame User (537 reputation)Advanced StrataFrame User (537 reputation)
Group: Forum Members
Posts: 105, Visits: 650
I have two BusinessObjects, of different types and databases.  I have to copy the data from one row into the other row.  I do this manually now by creating a newrow on the target BO, and then passing the current datarow for each to a method that sets the fields on the target BO from the source BO.  Then the targetBO has Save called.

This is done on several BO's with parent-child relationships.  My main problem are speed issues.  When I go to add a Topmost row in the parent-child relation order (? I guess its called an order, I dunno), it must add that single record, then all child records, grandchild records, great-grandchild records, and great-great-grandchild records.  These are done all the same way, newrow, copy all the fields, then save.

When all is said and done, I've added approximately 200-400 rows into the database and this is sometimes taking 20-30 seconds.

Is this the proper way to copy data from one BO to another or different types, or is there a better way?

Thanks. And have a good weekend.

Robin Giltner

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