PRB: Opening Database Named IN.DBC as a Table Causes ErrorLast reviewed: January 10, 1997Article ID: Q156582 |
The information in this article applies to:
SYMPTOMSAttempting to open a .dbc file named In.dbc as a table with the USE command causes the following error message to appear:
Expression is not valid outside of With/EndWith. CAUSEThe USE command has an IN clause. In this case, Visual FoxPro cannot determine whether the word "In" is a clause of the command or the file name.
WORKAROUNDThe following syntax successfully opens the .dbc file as a table:
USE "In.dbc" STATUSThis behavior is by design.
MORE INFORMATIONIn this case, the syntax of the USE command is ambiguous. The USE IN <exp> command closes a table located in the specified work area. Since it is not clear that "In" is a file name, FoxPro treats it like a clause of the USE command. When FoxPro interprets the USE command, it attempts to evaluate the .dbc file as a property. Since no such property exists, the error message appears.
Steps to Reproduce Behavior
|
KBCategory: kbprg kbprb
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |