Microsoft KB Archive/164729

= XL97: New Database Query (.dqy) File Format =

Article ID: 164729

Article Last Modified on 9/25/2001

-

APPLIES TO


 * Microsoft Excel 97 Standard Edition
 * Microsoft Query 2000

-



This article was previously published under Q164729



SUMMARY
Microsoft Query 97 uses a new database query (.dqy) file format. This article discusses the new format and how to use it with earlier versions of Microsoft Query.



MORE INFORMATION
The database query format is the default file format that is used when you use the Save command in Microsoft Query 97. For backward compatibility, Microsoft Query 97 continues to support Microsoft Query version 1.0 and 2.0 (.qry) files when you save and load these files. When you open a .qry file and edit it in Microsoft Query 97, features that cannot be represented in the .qry file format are not available. For example, parameterized query functionality is not available because this feature is not available in earlier versions of Microsoft Query. Also, if you create a query in Microsoft Query 97 and use features that are not supported in earlier versions, you cannot to save the .dqy file as a .qry file until you remove the new functionality.

The database query format is designed to be small, simple, and efficient. Note that most of the presentation information that can be saved in .qry files is not retained in the database query. Defaults are substituted for some items, such as window, table, and document positions. When you perform a new query, .qry files are not supported by the Microsoft Excel Run Query command or the Queries tab in the Choose Data Source dialog box. When you save a query in Microsoft Query 97, Microsoft Query saves a text file with a .dqy file name extension. This text file consists of at least four lines of text that are each separated by carriage returns and line feed characters. Note that these characters typically do not appear in a text editor.

The format of the Database Query file is as follows: XLODBC 1       where XLODBC is the type, 1 refers to Microsoft Query 97, and the , , and  lines are tab delimited.

Sample Database Query (.dqy) File
In the following example, text is wrapped to allow you to view it easily. In an actual .dqy text file, the connection string and SQL string text is not wrapped. Each text string appears on an individual line. The following is a sample .dqy file: XLODBC 1  CollatingSequence=ASCII;DBQ=C:\office97\Office;DefaultDir=C:\office97\

Office;Deleted=1;Driver= {Microsoft dBase Driver(*.dbf)};DriverId=277; FIL=dBaseIII;ImplicitCommitSync=Yes; MaxBufferSize=512;MaxScanRows=8; PageTimeout=600; ParadoxNetStyle=3.x;ParadoxUserName=admin;Statistics=0; Threads=3;UserCommitSync=Yes; SELECT CUSTOMER.CUSTMR_ID, CUSTOMER.COMPANY, CUSTOMER.CITY, CUSTOMER.REGION FROM CUSTOMER CUSTOMER CUSTMR_ID COMPANY CITY REGION

