Create Field in table and define it's position

C

chris

Can I create Field in a table and define it's position, for not being the
last field ?

ex. Table fields (Field1,Field2,Field3,Field4)

add Field5 and table fields to be (Field1,Field2,FIELD5,Field3,Field4)

Thanks a lot in advance!
 
D

Douglas J. Steele

Realistically, it shouldn't matter what order the fields are in in the
table. If you have a situation where the field order does matter, you can
create a query that orders the fields as desired, and use the query rather
than the table.

That having been said, if you're using DAO, the Field object has an
OrdinalPosition property that can be set before the Field object is added to
the Fields collection. There doesn't appear to be an equivalent property in
ADOX, although I suspect that it may be a provider-specific property that's
accessible through the Properties collection of the Column object.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top