Click to See Complete Forum and Search --> : Creating database using ADOX


Crazy D @ Work
November 8th, 1999, 10:16 AM
Hi
I've created succesfully an access database in code using ADOX (piece of cake), but I can't find anything about the field-order; I've append the columns in the right order, but when I open the database, the order of the fields is alphabetic, which not only looks bad but isn't handy at all.
Does anyone know how to set the "field-order"?
Tnx in advance

Crazy D @ Work :-)

November 8th, 1999, 10:36 AM
Open db in Access, highlight the table and click on Design. Click on first column you need to move to the different place then drag it to new position and drop.
Vlad

Crazy D @ Work
November 9th, 1999, 01:58 AM
Yeah, I know, but I mean from within code,
Tnx anyway.

Crazy D @ Work :-)

Lothar Haensler
November 9th, 1999, 06:59 AM
if you want to display the field names in the order you created it, you should be able to use the OrdinalPosition property of the fields collection of a table.

Crazy D @ Work
November 9th, 1999, 07:07 AM
tnx, but there is no object in the ADOX objects that has an OrdinalPosition property :-(
And for displaying within the program, I use another database, which is setup at designtime. This is an export database, created during runtime, I only have to fill it, not display it. It's not a big problem, but it looks "unfinished" (if you know what I mean) if it's sorted alphabetically.

Crazy D @ Work :-)