Fields in Access database returned in alphabetical order

JDMils

Member
Joined
Feb 25, 2006
Messages
5
Programming Experience
3-5
I'm using the following VB.Net code to retreive the field names of a table in an Access db:

Dim NewField As ADOX.Column
Dim tblField As ADOX.Column

For Each tblField In adocat.Tables("tblData").Columns

The fields are returned in alphabetical order! I want to have the fields returned in the order they were created. Can this be done?
 
Did you perhaps use the ORDER BY clause when querying database?
 
It's got nothing to do with SELECT statements. What I'm doing is enumerating the field names of a table- nothing to do with the data in the fields. ADOX enumerates the fields in alphabetical order whereby I need to enumerate them in their ordinal order.

I have posted the solution in the VBCity VB.Net Code Library here http://www.vbcity.com/forums/topic.asp?tid=122644.
 
Back
Top