Microsoft KB Archive/155820

= How To Refresh an Offline View in Visual FoxPro =

Article ID: 155820

Article Last Modified on 7/1/2004

-

APPLIES TO


 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q155820



SUMMARY
If you want to refresh an offline view, the REQUERY and REFRESH functions do not work. You need to use the Dropoffline command and then create the offline view again.



MORE INFORMATION
The REQUERY and REFRESH functions, which are typically used to update a view, result in "Invalid operation for offline view." Also an offline view does not refresh when you issue the USE ONLINE command. The only way to refresh an offline view is to drop the view and re-create it. The code below gives you an example of how to refresh an offline view called MYVIEW that resides in MYOFFLINE DBC.

WARNING: All uncommitted changes made to the offline view will be lost. CLOSE ALL SET MULTILOCKS ON  OPEN DATABASE Myoffline =Dropoffline("Myview") =Createoffline("Myview") USE Myview BROWSE



STATUS
This behavior is by design.

