Retrieving Access field names - in correct order
Posted on 2006-10-30
I'm using what I believe to be a fairly standard method of retrieving Access field names:
DbsConnection.Provider = "Microsoft.Jet.OLEDB.4.0"
strOpenMDb = "Data Source=" & FilePathAndName & ";Jet OLEDB:Database Password=" & Password
' Use OpenSchema and get the table names.
Set rs = DbsConnection.OpenSchema(adSchemaColumns, Array(Empty, Empty, tDef_Onnet_DSLAMs))
Do While Not rs.EOF
ThisCol = rs!COLUMN_NAME
However, the order in which it fetches the columns is different to how the columns are displayed within Access.
What do I need to do in order to fetch the column names in the same order as Access - this is most important.