Microsoft KB Archive/180272

= XL98: New Database Query File Format for MS Query 8.0 =

Article ID: 180272

Article Last Modified on 9/11/2002

-

APPLIES TO


 * Microsoft Excel 98 for Macintosh
 * Microsoft Query 2000

-



This article was previously published under Q180272



SUMMARY
Microsoft Query 8.0 for Microsoft Excel 98 Macintosh Edition uses a new database query 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 8.0. For backward compatibility, Microsoft Query 8.0 continues to support Microsoft Query version 1.0 files when you save and open these files. When you open a query file and edit it in Microsoft Query 8.0, features that cannot be represented in the query 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 8.0 and use features that are not supported in earlier versions, you cannot save the query file as a version 1.0 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 version 1.0 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, version 1.0 files are not supported by the Microsoft Excel Run Query command or by the Queries tab in the Choose Data Source dialog box.

When you save a query in Microsoft Query 8.0, Microsoft Query saves a text file that 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       Note that XLODBC is the type, 1 refers to Microsoft Query 8.0, and the , , and  lines are tab delimited.

Sample Database Query File
In the following example, text is wrapped to allow you to view it easily. In an actual query text file, the SQL string text is not wrapped. The following is a sample query file in Microsoft Query 8.0: XLODBC 1  DSN=MydBASE SELECT CUSTOMER.CUSTMR_ID, CUSTOMER.COMPANY, CUSTOMER.CONTACT, CUSTOMER.CON_TITLE, CUSTOMER.ADDRESS, CUSTOMER.CITY, CUSTOMER.REGION, CUSTOMER.ZIP_CODE, CUSTOMER.COUNTRY, CUSTOMER.PHONE, CUSTOMER.FAX FROM 'HD:Microsoft Office 98:Sample Files:Sample Databases':'CUSTOMER.DBF' CUSTOMER

CUSTMR_ID  COMPANY   CONTACT   CON_TITLE   ADDRESS   CITY REGION  ZIP_CODE   COUNTRY   PHONE   FAX

