DOCUMENT:Q140225 10-FEB-2000 [foxpro] TITLE :PRB: Error "File Does Not Exist" When Appending from a Cursor PRODUCT :Microsoft FoxPro PROD/VER:WINDOWS:3.0 OPER/SYS: KEYWORDS: ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual FoxPro for Windows, version 3.0 ------------------------------------------------------------------------------- SYMPTOMS ======== After using a SQL SELECT command, the temporary cursor created remains open and active but is read-only. Attempting to append records from this cursor by using the APPEND FROM command into a read/write Cursor or Table generates this error: File does not exist CAUSE ===== SQL cursors are temporary files residing in memory. When the APPEND command is issued, Visual FoxPro searches for the file in the default directory and along the search path. When the file is not found, the error is generated. RESOLUTION ========== To correct this problem, issue the APPEND FROM command with the DBF() clause, and pass the name of the cursor to the DBF() function as in this example: APPEND FROM DBF("") STATUS ====== This behavior is by design. MORE INFORMATION ================ Steps to Reproduce Behavior --------------------------- Type each of the following commands in the Visual FoxPro Command window: CREATE CURSOR Temp ( Cust_id c(5),Title c(30)) ** Creates a read/write cursor called Temp SELECT * FROM C:\VFP\SAMPLES \DATA\CUSTOMER INTO CURSOR Test ** Creates a read-only cursor called Test, open and active. SELECT Temp && Selects the read/write cursor APPEND FROM Test && Generates an error "File does not exist" APPEND FROM DBF("Test") ** Append records from read-only cursor into the read/write cursor. Additional query words: VFoxWin ====================================================================== Keywords : Technology : kbVFPsearch kbAudDeveloper kbVFP300 Version : WINDOWS:3.0 ============================================================================= 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.