Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
When is a View updated?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00151033
Message ID:
00151433
Vues:
18
>>>I have a form for posting payments. Once the payments are posted I want to print a receipt. The receipt report is based on a view of the payment table and customer table. I have noticed after a lot of debugging that right before I print the report, I can browse the payment table and the records are updated correctly. If I browse the records of the view .. they have not been updated yet. So I can't print my receipt. What is causing this? Is there something I am not doing correctly?
>>>
>>>Thanks,
>>>
>>>Paul
>>
>>Hi Paul,
>>
>>Might be a foolish question, but are you using the view to post the payments from the form? If so, do a REQUERY() on the view after the TABLEUPDATE(). This should refresh the view with the current table data.
>>
>>Phil
>
>Hi Phil,
>
>I am updating tables actually. I do a requery in the form that updates the payment table. I just now tried to browse the records right after the requery and I see that the records in the view are updated correctly. Now when I create an instance of my report class with createobject and browse the records of the view they aren't udpated correctly. I guess I don't understand what the requery is doing exactly. Does what I say is happening make sense?
>
>Thanks,
>
>paul

Hey Paul.

If you're using an updateable view, the TABLEUPDATE() posts your view to the underlying table. REQUERY() refreshes your view from the underlying table.
Ken Sorce
Team RAD, Inc.
Rapid Application Developers
Ken@TeamRAD.com
www.teamrad.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform