Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CursorAdapter base table and child table
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01532500
Message ID:
01532520
Vues:
19
>>>>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?

No, I don't need to select fields from Details table. Just to have it in the SQL Select (as in LEFT JOIN ...). I will have to test it. Your last sentence would be what I am looking for except you put a question mark at the end. Which I interpret that you are not sure (and if you are not who is?! <g>)
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform