Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

You may receive an error message when you open a DQY file in Excel


View products that this article applies to.

This article was previously published under Q277587

↑ Back to the top


Symptoms

When you open a Microsoft Query file (.dqy) in Microsoft Excel, you may receive one of the following error messages:
[Microsoft][ODBC Microsoft Access Driver] The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect.
File could not be opened. It is either damaged or the file format is not valid. Try opening it in the application that created it and saving to a new file.
This error message is followed by the following error message:
Unable to open or read this connection file. Either the file has been damaged or the file format is not valid.

↑ Back to the top


Cause

This behavior can occur if the SELECT statement in the .dqy file contains the tab or carriage-return characters.

↑ Back to the top


Workaround

To work around this issue, remove all tab and carriage-return characters from the SELECT statement in the Microsoft Query file. To do this, follow these steps:
  1. Make a backup copy of your .dqy file.
  2. Open the .dqy file in Notepad.
  3. Delete all tab and carriage-return characters from the SELECT statement lines of the file.

    Note You may find tab and carriage-return characters elsewhere in in the file. Those characters must remain intact.
  4. On the File menu, click Save, and then exit Notepad.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


More information

When you create a .dqy file by using Microsoft Query, the SELECT statement does not contain any additional non-alphanumeric characters other than spaces, periods, semicolons, apostrophes, or quotation marks.

↑ Back to the top


Keywords: KB277587, kbpending, kberrmsg, kbbug, kbexpertisebeginner, kbtshoot, kbprb

↑ Back to the top

Article Info
Article ID : 277587
Revision : 4
Created on : 2/2/2007
Published on : 2/2/2007
Exists online : False
Views : 215