PRB: Copy To ... Type SDF Causes Error Message in Visual FoxProLast reviewed: September 11, 1997Article ID: Q172923 |
The information in this article applies to:
SYMPTOMSIssuing two consecutive COPY TO <filename> TYPE SDF commands causes Visual FoxPro 5.0x to return the following error message on the second command:
File <filename>.txt already exist as part of a database.This error does not occur in Visual FoxPro 3.0b.
RESOLUTIONCheck for the existence of the first SDF file and if it exists delete it. In the code example in the MORE INFORMATION section below, the following code accomplishes this task. Place the code between the two COPY TO commands:
IF FILE("test1.txt")=.t. DELETE FILE test1.txt ENDIF STATUSMicrosoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONThe error message occurs only when zero (0) is the first character in the SDF file. However, if the resulting SDF file is smaller than 8000 bytes, the error does not occur even if the zero character is in the SDF file. Finally, choosing any other file format or placing any other character in the SDF file prevents the error.
Steps to Reproduce BehaviorCreate a program that contains the following code and execute it:
CLEAR CREATE TABLE test1.dbf FREE (f C(100)) FOR i = 1 TO 80 INSERT INTO test1 VALUES ("0") NEXT COPY TO test1.txt TYPE SDF COPY TO test1.txt TYPE SDFThe error appears on the second COPY TO command.
|
Additional query words: sdf
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |