Re: Field position in a record, how to change?
- From: "Sven Pran" <no.direct@xxxxxxxxxxx>
- Date: Fri, 15 Dec 2006 09:53:21 +0100
"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 theimpression 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
.
- Follow-Ups:
- Re: Field position in a record, how to change?
- From: Brian Bushay TeamB
- Re: Field position in a record, how to change?
- From: Andrew
- Re: Field position in a record, how to change?
- References:
- Field position in a record, how to change?
- From: Sven Pran
- Re: Field position in a record, how to change?
- From: Brian Bushay TeamB
- Field position in a record, how to change?
- Prev by Date: Re: Adding field to table
- Next by Date: Re: How to get Inserted Id after ExecSQL()?
- Previous by thread: Re: Field position in a record, how to change?
- Next by thread: Re: Field position in a record, how to change?
- Index(es):
Relevant Pages
|