Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Indexing views in a one to many form
Message
De
09/04/2003 15:46:44
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00749578
Message ID:
00775723
Vues:
17
Hi Raymond,

I do a requery() of the child table everytime the main table changes the record pointer. You might want to have a property in the form that tells you the current record and check against recno('mainTable') to fire the requery(). It is not a good idea to place the requery() on the thisForm.refresh() event because you might want to refresh() the form just to change the status of the controls, ....

If you use views for the main table, you should place it on your VCR buttons.

If you are using n-tier design everything changes.

Javier.

>This is exactly what I am looking for.
>Can you guys tell me where you place what code?
>Thank a bunch
>
>Raymond
>
>>Hi Dan, thanks a lot. I didn't use it in the first placed because in the help file says that REQUERY() is for remote views, but it's working fine for my local views.
>>
>>Thanks again,
>>Javier
>>
>>>For your child records, you want a *parameterized* view.
>>>
>>>Set the parameter to be the parent primary key, and then Requery() when the parent record changes. You'll always be displaying only the records that match the current parent record, so no need for relations or filters.
>>>
>>>Dan
>>>
>>>>Hi all,
>>>>
>>>>I'm having the following problem when using views in one-to-many forms: instead of the child table I use a view, but in order to establish the relationship between the parent and the child table I have to index the view.
>>>>
>>>>Problem arises because I cannot index the view because is in buffer mode (all my forms are buffered). If I don't use buffering at all, I cannot use tableupdate() and only the last record updated in the view can be saved-unsaved. If I try to unset buffering, index, and then set again buffering on it says me that "this configuration will take effect next time you load dataenvironment".
>>>>What I'm doing now is filtering the view to match the ID in the parent table, but I think it should not the right way to go (it is slower and the scroll bar does reflect the whole view, not just the matching records).
>>>>
>>>>I'd appreciate some light on this, and would like what are you doing to acomplish this, as it might be a common topic.
>>>>
>>>>Kind regards,
>>>>Javier Borrajo.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform