PRB: Error "File Does Not Exist" When Appending from a CursorLast reviewed: November 29, 1995Article ID: Q140225 |
The information in this article applies to:
SYMPTOMSAfter 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 CAUSESQL 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.
RESOLUTIONTo 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("<Read-Only Cursor name>") STATUSThis behavior is by design.
MORE INFORMATION
Steps to Reproduce BehaviorType 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 <path> does not exist" APPEND FROM DBF("Test") ** Append records from read-only cursor into the read/write cursor. |
Additional reference words: 3.00 VFoxWin
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |