Board index » delphi » Add a field to a Paradox table at runtime of a delphi app???

Add a field to a Paradox table at runtime of a delphi app???

Hi there,

Can anybody tell me how to add a field to a paradox table at runtime in a
delphi application?  It's probably easy to do(If it's possible) but I don't
know where to start.

Please e-mail me.

Thanks in advance.

Mark Buchwald, P.Eng.
mb...@supweigh.ca

 

Re:Add a field to a Paradox table at runtime of a delphi app???


Mark Buchwald schrieb in Nachricht ...

Quote
>Hi there,

>Can anybody tell me how to add a field to a paradox table at runtime in a
>delphi application?  It's probably easy to do(If it's possible) but I don't
>know where to start.

>mb...@supweigh.ca

I use a query to do it.

with Query do
begin
  SQL.Add('alter table "test.db" add name char(50);'
  ExecQL;
end;

Heiko

Re:Add a field to a Paradox table at runtime of a delphi app???


Hi Mark,

you can use an sql statement like this:

ALTER TABLE YourTableName ADD YourField smallint

You have to write this query in a TQuery component and then
call ExecSql method.
* With this command you can not specify if field can be null or not....
You can also use BDE directly (Delphi libraries don't permit a restructure)
but I don't know how exactly.

Hope it helps
Carlo

Mark Buchwald ha scritto nel messaggio ...

Quote
>Hi there,

>Can anybody tell me how to add a field to a paradox table at runtime in a
>delphi application?  It's probably easy to do(If it's possible) but I don't
>know where to start.

>Please e-mail me.

>Thanks in advance.

>Mark Buchwald, P.Eng.
>mb...@supweigh.ca

Other Threads