XL98: New Database Query File Format for MS Query 8.0 (180272)
The information in this article applies to:
- Microsoft Excel 98 Macintosh Edition
- Microsoft Query
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
<DSN Name>
<SQL String>
<Parameter names>
<Parameter data types>
<Column Names>
Note that XLODBC is the type, 1 refers to Microsoft Query 8.0, and the
<Parameter names>, <Parameter data types>, and <Column names> 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
REFERENCES
For more information about using database query files, click the
Index button in Microsoft Query Help, type the following text
and then double-click the selected text to go to the "Save a query" topic.
For more information about creating a parameter query from Microsoft Excel,
click the Index button in Microsoft Excel Help, type the following text
and then double-click the selected text to go to the "Create a new query"
topic.
Modification Type: | Major | Last Reviewed: | 9/11/2002 |
---|
Keywords: | KB180272 |
---|
|