PRB: SET INDEX TO Command Causes Error When Run from a Form (140565)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
- Microsoft Visual FoxPro for Windows 3.0b
This article was previously published under Q140565 SYMPTOMS
One of the following errors occurs occur when attempting to run the SET
INDEX TO command programmatically from a running form:
- File must be opened exclusively.
-or-
- File is in use by another.
CAUSE
A table opened by the Data Environment of a form is opened shared by
default. Therefore, when the form is running and you issue an INDEX ON
command, an error occurs.
RESOLUTION
Set the Exclusive Property of the cursor to .T. at design time.
NOTE: Attempting to set this property at run-time causes the following
error message:
Property setting will not take effect until data environment reloaded
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 9/30/2003 |
---|
Keywords: | kberrmsg KB140565 |
---|
|