Re: Field position in a record, how to change?




"Brian Bushay TeamB" <BBushay@xxxxxxxxx> wrote in message
news:7354o253oq0h4n4l9qmml6jiur12baf86n@xxxxxxxxxx

I have a situation where I need to alter a table in an ACCESS
database so that a particular field is moved to a new ordinal
position using ADO with Delphi (BDS) 2006.

From searching in various documentations I have the
impression that this is not directly possible using SQL DDL
and that I would have to use DAO or ODBC, both of which
seems available only for C++?

Associated problems include creating a new field into a
particular ordinal position in an existing table and renaming
an existing field in a table.

The hard way is of course to create a new table the way I
need it and copy all records (fieldwise) from the old table
to the new table.

Have I overlooked some possibility of an easier way to do
this?

ODBC does not restructure tables.
If you know how to move fields with DAO you can use Ole to access the
commands.

Otherwise creating a new table and moving the records should not be too
difficult

Thanks for the comments. My prime problem with DAO and OLE
is that i don't know anything about them (yet). Also I am reluctant to
involve myself with C++ which seems to be a prerequisite?

However, I have found how to obtain the (ADO) FieldDefs for the
desired table structure. Can I create a new table with TADOCommand
or TADODataset and just use an existing FieldDefs to specify the new
table structure? How?

(I am searching documentations for this option but your answer might
save me some precious time and effort?)

PS. I may just have found the answer in my saved Delphi 5 help files
on the documentation for TTable.CreateTable!
I shall be experimenting with that.

regards Sven


.



Relevant Pages

  • Simple TADOQuery is not live
    ... I am in the process of moving from DAO to ADO using ... ADOExpress using Delphi 7. ... With DAO when doing the Edit I get the latest data in the record. ... Surely this is not a "live" query just an updateable ...
    (borland.public.delphi.database.ado)
  • Re: New Access Query
    ... It is in Delphi menu - select menu item Project, ... DAO is set of objects for VB similar to ADO, ... >> Vassiliev V. V. ...
    (borland.public.delphi.database.ado)
  • Re: How to enforce subtypes/supertypes in Access 2000?
    ... DAO is the native object model for Jet databases and, as such, is the ... ever need ADO. ... Private Sub SetContactType() ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Access 2007 and VB
    ... "unrecognized database format" ... There is a bit of confusion with ADO access to the new MSAccess ACCDB ... You could reference "DAO". ...
    (microsoft.public.vb.general.discussion)
  • Re: Access 2007 and VB
    ... and link to the download as a non expert some ... There is a bit of confusion with ADO access to the new MSAccess ACCDB ... You could reference "DAO". ...
    (microsoft.public.vb.general.discussion)