The information in this article applies to:
SYMPTOMSWhen you use SQL Server 7.0 Distributed Query with Jet 4.0 OLE DB Provider, if you do not ask for specific columns to retrieve, the result-set will show the columns sorted alphabetically instead of using the natural order of columns in the native table. STATUSThis is by design. With a select * you are not guaranteed any column order with SQL Distributed query. If you want a specific column order then specify a column list. MORE INFORMATIONMicrosoft SQL Server version 7.0 provides the ability to perform queries against OLE DB providers. This is done by using the OpenQuery or OpenRowset Transact-SQL functions or by using a query with four-part names including a linked-server name. Steps to Reproduce BehaviorRun the following query in SQL Query Analyzer:SELECT * From OpenRowset('Microsoft.Jet.OLEDB.4.0',The query will return a result-set where the columns are sorted alphabetically. If you open the .mdb file using Access 97 you will see a different order of columns. Using Jet OLEDB provider directly preserves the natural order of columns as shown by the ADO code given below:
REFERENCES
For more information on setting up and using Distributed Queries, search on
sp_addlinkedserver, OpenQuery, OpenRowset, and related topics in SQL 7.0
Books Online.
Additional query words:
Keywords : kbDatabase kbOLEDB kbProvider |
Last Reviewed: November 20, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |