How to access child objects in hierarchical database setup

Ruslan Zasukhin sunshine at public.kherson.ua
Sun Nov 2 20:20:15 CST 2003


on 11/2/03 19:34, Arthur Clemens at aclemens at xs4all.nl wrote:

>> Back to your question.
>> Let you have RecID of some ParentTable record,
>> Now you want find its child records.
>> 
>> You need do simply:
>> 
>>     ArraySet* pChilds = childTable.ptr.FindAsArraySet( &RecID );
>> 
>> 
>> Note, since in most cases the count of childs will not be not huge, it
>> is
>> better to use ArraySet.
> 
> I was worried about the speed issue of retrieving the children.
> Especially as I need to do that with every Record occurrence in view.
> If I have a table view with visible window of 30 items, I need to do
> this 30 times per update, for instance with scrolling...

But there is no faster way.

Only if pre-built some lists of linked records....

So you have 30 parent records in view.
Each parent record linked to n (how much?) child records.
You have found child records...
What next? You should all them?  30 * n records?

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list