PRB: COPY TO or APPEND FROM Fails If Semicolon Is Delimiter

Last reviewed: June 27, 1995
Article 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 ";" 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 ";" 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 ";" 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


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.

Last reviewed: June 27, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.