DOCUMENT:Q155937 24-MAR-2000 [foxpro] TITLE :FIX: SET COMPATIBLE ON Causes Problems with Crosstab Query PRODUCT :Microsoft FoxPro PROD/VER:WINDOWS:3.0,3.0b OPER/SYS: KEYWORDS:kbbuglist kbfixlist ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual FoxPro for Windows, versions 3.0, 3.0b ------------------------------------------------------------------------------- SYMPTOMS ======== If you have SET COMPATIBILITY ON for dBASE when you are running a crosstab query programmatically, the following error occurs: Line: 17 Program: Destroy Error: 1924 Message: MYCURSOR is not an object. Code: SET FIELDS TO &cTmpStr If you have SET COMPATIBILITY ON for dBASE when you are running a crosstab query using the Query Designer, the following error occurs: Line: 17 Program: Destroy Error: 13 Message: Alias '' is not found. Code: SET FIELDS TO &cTmpStr After you click the OK button, the query appears. WORKAROUND ========== When you run a crosstab query programmatically or use the Query Designer, SET COMPATIBLE must be OFF to avoid these error messages. By default, SET COMPATIBLE is OFF. STATUS ====== Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in Visual FoxPro 5.0 for Windows. MORE INFORMATION ================ Steps to Reproduce Behavior --------------------------- To reproduce the error programmatically, type the following code into a program and run it. Make sure that SET COMPATIBLE is ON. From the Tools menu, click Options. Click the General tab and select the "dBASE Compatibility" check box: PUBLIC MyCursor SELECT Orders.to_city, YEAR(Orders.order_date), ; SUM(Orders.order_amt) ; FROM TestData!Orders ; GROUP BY Orders.to_city, 2 ; ORDER BY Orders.to_city, 2 ; INTO CURSOR MyCursor DO (_GENXTAB) WITH MyCursor BROWSE NOMODIFY Additional query words: kbstream VFoxWin ====================================================================== Keywords : kbbuglist kbfixlist Technology : kbVFPsearch kbAudDeveloper kbVFP300 kbVFP300b Version : WINDOWS:3.0,3.0b Issue type : kbbug Solution Type : kbfix ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 2000.