Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Updating a view problem
Message
From
02/09/2003 09:02:39
Mike Sue-Ping
Cambridge, Ontario, Canada
 
 
To
02/09/2003 00:07:22
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00824703
Message ID:
00825265
Views:
35
Hi Elmer,

Thank you for clarifying something I was begining to suspect about VFP views and their inability to "refresh automatically" when a stored procedure changed a field in it.

How do I "requery the view after tableupdate" if it is in the form's dataenvironment?

Also, someone mentioned to me that an ADO recordset can be bound to the underlying database so that any changes can be reflected in the recordset. Do you know if this is true and if so, how? Is it related to the CursorAdaptor in VFP8?

Thanks for the feedback.

Regards,

Mike



>Mike,
>
>If your stored procedure is updating the underlying tables and returns .t. or .f. if successful or not, probably your only 2 options would be to calculate the area value in your form and replace the area field in the view prior to tableupdate(), OR requery the view after tableupdate. A view is a buffered snapshot of the underlying data at the time that the view is opened. You can make changes in the view and do tableupdate to save your edits, but you will not see any changes that are done by other users or by any update trigger or stored procedure unless you requery the view. Requery may be a performance hit, depending on how many records in the view.
>
>HTH
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform