Board index » off-topic » Is it possible to add a field in a TTable at runtime?

Is it possible to add a field in a TTable at runtime?


2003-07-19 02:26:44 AM
off-topic9
Hi experts,
I tried this;
Table1.FieldDefs.Add(...);
now, how to add this field in the field Editor
Thanks !
Steph.
 
 

Re:Is it possible to add a field in a TTable at runtime?

Hi,
Try This code :
Query1.Close;
Query1.SQL.Clear;
Query1.SQL.Add('ALTER TABLE paradoxtablename');
Query1.SQL.Add('ADD fieldname fieldtype'); * ex : fieldtype = Char(5)
Query1.ExecSQL;
GN.
Stephan Ouellet < XXXX@XXXXX.COM >a écrit dans le message :
XXXX@XXXXX.COM ...
Quote
Hi experts,

I tried this;

Table1.FieldDefs.Add(...);

now, how to add this field in the field Editor

Thanks !

Steph.


 

Re:Is it possible to add a field in a TTable at runtime?

Hi,
Try This code :
Query1.Close;
Query1.SQL.Clear;
Query1.SQL.Add('ALTER TABLE paradoxtablename');
Query1.SQL.Add('ADD fieldname fieldtype'); * ex : fieldtype = Char(5)
Query1.ExecSQL;
GN.
Stephan Ouellet < XXXX@XXXXX.COM >a écrit dans le message :
XXXX@XXXXX.COM ...
Quote
Hi experts,

I tried this;

Table1.FieldDefs.Add(...);

now, how to add this field in the field Editor

Thanks !

Steph.


 

{smallsort}