Article ID: 299484 - View products that this article applies to.
This article was previously published under Q299484
This article has been archived. It is offered "as is" and will no longer be updated.
If you use the ADOX Catalogs collection and the Microsoft OLE DB Provider for Jet to retrieve the columns of a Microsoft Access table, the columns are sorted alphabetically.
OLE DB Provider 4.0 for Jet retrieves columns in alphabetical order rather than in column ordinal position order.
To work around this problem, use ODBC Driver for Microsoft Access in conjunction with OLE DB Provider for ODBC. Other OLE DB Providers, such as the OLE DB Provider for SQL Server, do not pose this problem.
If you must use OLE DB Provider for Jet, use the OpenSchema method of the ADODB Connection object, and sort the resultant recordset on the ORDINAL_POSITION field.
Steps to Reproduce Behavior
For more information, see the following MSDN articles:
ADOX Table Object
Article ID: 299484 - Last Review: February 27, 2014 - Revision: 3.2