PRB: Import Wizard Incorrectly Treats Consecutive Delimiters

Last reviewed: October 29, 1996
Article ID: Q157724
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, version 5.0

SYMPTOMS

The Import Wizard does not properly import a file containing consecutive delimiters. First, the Import Wizard does not treat consecutive delimiter characters as one field. The Import Wizard creates an extra column in the data table (.dbf). Second, the Import Wizard may truncate data that appears in the text file. This happens with files delimited with tabs or commas.

WORKAROUND

Create a table with the desired structure. Then write a program using low- level file functions to parse the text file and place the data into the newly created table.

STATUS

Microsoft is researching this behavior and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

The steps below illustrate the behavior of the Import Wizard.

Steps to Reproduce Behavior

  1. Create a Test.txt file that contains the following sample data:

          hello1,goodbye1,goodbye3,goodbye4
          hello2,,goodbye2,goodbye2,goodbye2
          hello3,,goodbye3,,goodbye3,,goodbye3
    

  2. Start the Import Wizard, click "Text file" as File Type, and click Test.txt as the Source File and Testtxt.dbf as Destination File (New table). Click Next.

  3. Change Data Format to "Delimited," and click Next.

  4. In step 2a of the wizard, select "Comma" as the field delimiter and select the "Treat consecutive delimiters as one" check box. Finally, in the "Text Delimiter" list select "None" and click Finish.

  5. Type "BROWSE" (without the quotes) in the Command window. The table has seven columns instead of four. Note that the column4 field of record 2 is empty. Additionally, three fields in record 3, column2, column3, and colum4, are also blank. This data was truncated.


KBCategory: kb3rdparty kbtool kbprb
KBSubcategory: FxtoolWizother
Additional reference words: 5.00 kbdsd VFoxWin



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: October 29, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.