Microsoft KB Archive/102047
Article ID: 102047
Article Last Modified on 10/15/2003
- Microsoft Visual FoxPro 3.0 Standard Edition
- Microsoft FoxPro 2.0
This article was previously published under Q102047
Closing a Visual FoxPro Query Designer or a FoxPro 2.x RQBE query with no fields selected for output will generate a two-part error:
- A window will open showing the SELECT statement with an "SQL Invalid SELECT" message.
- A dialog box will warn you about not being able to reopen the query and then asks if you want to continue.
A SELECT statement with no fields selected cannot be closed because it is not a valid SQL statement--FoxPro checks to see if it is a valid SQL statement before bringing up the Save dialog box. The Query Designer and RQBE depend on being able to compile the SQL statement when they open a .QPR file. Therefore, FoxPro will not save an invalid, uncompilable statement by bringing up the Save dialog box when the close box is used.
To save an SQL statement that has no selected fields, choose Save or Save As from the File menu. This method works because FoxPro does not check the SQL statement to make sure it is valid first. However, when you attempt to open the *.QPR file, the following error message appears:
If you attempt to run the invalid *.QPR file by choosing Query from the Run menu, the following error messages appear:
Additional query words: FoxDos FoxWin VFoxWin 2.50 2.50a 2.50b 2.60 2.60a