Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CursorAdapter base table and child table
Message
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01532500
Message ID:
01532516
Views:
59
This message has been marked as the solution to the initial question of the thread.
>>>Hi,
>>>
>>>I have come across a situation that I can't seem to resolve and I really need help.
>>>
>>>I have a BIZ class based on a cursor adapter for a Purchase Order Header table. The base table for this BIZ class is the P.O. Header.
>>>
>>>I have another BIZ class based on the cursor adapter for a Purchase Order Item table. Base table for this BIZ is P.O. Items table. Note that these are two separate BIZ classes even though the P.O. Header table is related to the P.O. Item Table.
>>>
>>>If the code need to search records in the P.O. Header table it is easy to do with the CursorFill() method. The same goes for the P.O. Item Table.
>>>
>>>The problem is when I need to select records from P.O. Header based on the criteria in the P.O. Item. For example, user want to view all P.O.s where item unit price is greater than $100.
>>>
>>>I can't change the design and have a BIZ object based on the two tables. So anything else can be done?
>>>
>>>TIA.
>>
>>You can have some custom Select methods of the parent class that will change SelectCMD on the fly and execute the cursorfill method.
>
>But my understand was that the CursorFill method can only work with fields/columns that are part of the CursorAdapter schema. Right? And the P.O. Items table is not in the CursorAdapter of the P.O. Header table. So I am not sure if anything can be done with the cursorfill method. But thank you for the suggestion.

Do you want to select fields from the Details table as well? E.g. can you select the same fields (PO Header only) but set SQL statement to use both tables to specify both conditions?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform