Re: Runtime adding files to database via a TADOConnection - how?



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




.



Relevant Pages

  • Re: How to Get the Total Disk Space on a server
    ... I have a perl script that gets a lot of the disk info I need but I would like ... The 'oItem.Size' has a data type of 'String', so when you set your variant ... "String" datatype together, you will get a value of '11'. ... I need to get the disk size, free space and used for each ...
    (microsoft.public.windows.server.scripting)
  • Re: How to Get the Total Disk Space on a server
    ... 'CDbl' converts a variable to the "Double" datatype. ... The 'oItem.Size' has a data type of 'String', so when you set your variant ... >>> This sample script will pull the Disk Name for every logical disk on a ...
    (microsoft.public.windows.server.scripting)
  • Re: Edit text file.
    ... > alter the line ... > write the file back to disk (overwite the original file for instance) ...
    (microsoft.public.dotnet.languages.vb)
  • Re: missing hard drive space
    ... Is there a way to alter this and to regain my space or at least see it ... That's sd*, all disks, not just sda, the first disk. ... Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org ...
    (Ubuntu)
  • Re: WOTP Re: Sonys gone insane
    ... >>> burn info onto a disk. ... To alter a key encoded on a disk wouldn't you need a ... >> The next gen media players don't exist yet (or don't exist on the ... >> be a burner built into every player. ...
    (rec.arts.tv.mst3k.misc)