Microsoft KB Archive/98571

{| = Q+E: Errors Opening Text Files that Contain Blank First Row =
 * width="100%"|

Last reviewed: September 12, 1996

Article ID: Q98571 The information in this article applies to:
 * Q+E for Microsoft Excel for Windows, versions 3.0 and 3.0a
 * Q+E for Microsoft Excel for OS/2, version 3.0

SUMMARY
If you try to open a text file in Q+E and the first row of the text file is blank, you may receive one of the following error messages:

 Syntax error in data type portion of SQL statement -or- Bad Parse string

MORE INFORMATION
The text file driver in Q+E can read the following two types of text files in a Query window:

Character Delimited ---

A character-delimited text file contains fields separated by a  special character (often a comma or tab). The message &quot;Syntax error in data type portion of SQL statement&quot; occurs if you attempt to  query on two or more fields of a character-delimited text file that contains a blank first row.

-and-

Fixed Format

A fixed-format text file contains fields whose values start at the same position on each line. The message &quot;Bad Parse string&quot; occurs if you try to open any fixed-format text file whose first row is  blank.

Workarounds
To work around this problem, do one of the following:

 Open the text file in a text editor. Remove any blank rows that precede the first record, or field headings. If the text file does not contain field headings you can type appropriate field headings on the first row for each field. Save the file. -or- Use Microsoft Excel to create the text file if it is a tab- or comma-delimited file. Microsoft Excel will automatically skip to the first nonblank row and nonblank column when it creates a character-delimited text file.