Microsoft KB Archive/95372

{| = PRB: COPY TO or APPEND FROM Fails If Semicolon Is Delimiter =
 * width="100%"|

ID: Q95372

The information in this article applies to:


 * Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, and 2.5a
 * Microsoft FoxPro for Windows, versions 2.5 and 2.5a

SYMPTOMS
A COPY TO or APPEND FROM command is not executed if the last character is a semicolon.

CAUSE
When FoxPro sees the character &quot;;&quot; at the end of a command line, it expects a continuation before executing the whole command.

RESOLUTION
When you are using a semicolon as a delimiter in the COPY TO or APPEND FROM command, the semicolon must not be the last character on the command line. To force FoxPro to execute the command, add a clause such as FOR to the end of the command line.

For example, the code below creates an ASCII file of type delimited (with the character &quot;;&quot; as the delimiter) named MYTEXT.TXT from a database named CUSTOMER.DBF:

USE CUSTOMER COPY TO MYTEXT.TXT TYPE DELIMITED WITH ; FOR .T. The code below appends to a database named NEWCUST.DBF the information contained in an ASCII file of type delimited (with the character &quot;;&quot; as the delimiter) named MYTEXT.TXT: USE NEWCUST APPEND FROM MYTEXT.TXT TYPE DELIMITED WITH ; FOR .T. Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a KBCategory: kbprg kbprb KBSubcategory: FxprgGeneral
 * }