PRB: REQUERY Function Reopens a View's Table ExclusivelyLast reviewed: July 3, 1997Article ID: Q149000 |
The information in this article applies to:
SYMPTOMSIf you requery a view to refresh it with new data, the table with which the view is associated will be opened exclusively -- if it has been closed after the view was opened. This occurs even if SET EXCLUSIVE is off. Requerying a view opens the associated table if that table is not already open.
WORKAROUNDTo make sure that the table that is associated with the view stays open in shared mode, do not close the table after the view has been opened. For example, a form may close the table; and then the view gets requeryed. Another possible resolution to repopulating a control with new data is to set the rowsource (or recordsource) to an empty string, perform the requery and then set the rowsource or recordsource to the original value, as follows:
ThisForm.Combo1.Rowsource="" Requery() ThisForm.Combo1.Rowsource="<path and name>". STATUSThis problem has been fixed in Visual FoxPro 5.0.
MORE INFORMATIONIf a view is opened and its associated table is not already open, the table will be opened exclusively or shared depending on current Visual FoxPro settings. For example, if EXCLUSIVE is set to Off, the table will be opened shared. If the table is closed while the view is still open, requerying the view with the REQUERY() function will open the table exclusively no matter what the EXCLUSIVE setting.
Steps to Reproduce Behavior
|
Keywords : FxotherGeneral vfoxwin
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |