Re: Runtime adding files to database via a TADOConnection - how?
- From: "Michael Jacobs" <iq193@xxxxxxxxxxxxx>
- Date: Tue, 30 May 2006 17:33:33 -0400
to add a field to a talbe use the 'Alter table' statement..
as an example: ALTER TABLE tablename ADD fieldname fielddatatype
if you can read the field information from a TADODataset, then you need only
substitute that informaiton for the 'fieldname' and 'fielddatatype'. You
most likely will have to translate the datatype from the ADO datatype to the
comparable Access value.
hth,
Michael
"Mike Shkolnik" <mshkolnik2002@xxxxxxx> wrote in message
news:4479f573@xxxxxxxxxxxxxxxxxxxxxxxxx
Just execute the CREATE TABLE statement to create the new table in your
ADO
connection
--
With best regards, Mike Shkolnik
E-mail: mshkolnik@xxxxxxxxxxxxx
WEB: http://www.scalabium.com
"Pontus Berg" <pontus@xxxxxxxxxxxxxxxxx> wrote in message
news:447995c0@xxxxxxxxxxxxxxxxxxxxxxxxx
Howdy!
If I have connected to an Access database on disk, via a TADOConnection
component, then how do I add fields at runtime? I find no method that
would enable me to do it. Adding via SQL - is that it? (This is no SQL
group, but any hints?)
Also, if a TADODataset contains the field I want to add, but the base on
disk doesn't, how do best I read the characteristics (type and so on) of
the field from the Dataset and add it to the base on disk? Again, this
must all be at runtime!
Identifying the fields missing on disk and finding the name of it from
the Dataset is under control. What I now need help with is "only"
identifying the datatype of the field and how to add it to the database
on disk.
/Pontus
Setup: Delphi 2006, Windows
.
- References:
- Runtime adding files to database via a TADOConnection - how?
- From: Pontus Berg
- Re: Runtime adding files to database via a TADOConnection - how?
- From: Mike Shkolnik
- Runtime adding files to database via a TADOConnection - how?
- Prev by Date: Re: Cannot insert or update columns from multiple tables (post #2) Need help please
- Next by Date: Re: Cannot insert or update columns from multiple tables (post #2) Need help please
- Previous by thread: Re: Runtime adding files to database via a TADOConnection - how?
- Next by thread: Cannot insert or update columns from multiple tables (post #2) Need help please
- Index(es):
Relevant Pages
|