0

I'm using Business Objects Collections.
(Not using datasets. Generics collections only.)
Collections of Business objects are filled using SQL Reader

I'd like to know your opinion what is best approach to fill master details (or parent-child) collections

Assume I have 2 objects: Invoice and Invoice_Details
Invoice Object has generic collection "Details" (type of Invoice Details)

What would be best approach to work / fill both collections?
(Eg I'd like to read all invoices from 2008 yr and present on GUI)

  • Do you read all invoices for selected date range, than all children and populate proper Invoice's Details
  • Or read invoice one by one and related details? (eg using multiply result sets)
  • I've also noticed approach based on Binding Source -> read children only when changing current record position...

I'm very interested your opinion what would be best / fastest scenario?

4

2 回答 2

0

这取决于你想要做什么。

如果您在需要发票时需要所有发票详细信息,则在您首次访问发票时发出详细信息查询(除非您知道您总是需要两者,在这种情况下,发出带有两个结果集的单个批次) .

类似的模式适用于其他情况。

于 2009-07-06T12:40:17.100 回答
0

为了尽量减少影响,我会一次性加载 Invoice 记录,然后仅在需要时才延迟加载 Invoice_Details。这具有加载所有发票数据的最快方式的优势,同时呈现最低的内存使用量。

于 2009-07-06T12:42:00.297 回答