Microsoft KB Archive/157724

= BUG: Import Wizard Incorrectly Treats Consecutive Delimiters =

Article ID: 157724

Article Last Modified on 10/15/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q157724



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 has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.



MORE INFORMATION
The steps below illustrate the behavior of the Import Wizard.

Steps to Reproduce Behavior
  Create a Test.txt file that contains the following sample data:      hello1,goodbye1,goodbye3,goodbye4 hello2,,goodbye2,goodbye2,goodbye2 hello3,,goodbye3,,goodbye3,,goodbye3  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. Change Data Format to "Delimited," and click Next. 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. Type BROWSE 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.</li></ol>

Additional query words: kbdsd VFoxWin

Keywords: kb3rdparty KB157724

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.