Board index » delphi » Copy of Paradox table during runtime

Copy of Paradox table during runtime

Help me, please!

Within DELPHI 4 I have been trying to make a copy of
PARADOX table together with all records during runtime. I
choose a table for the copying through OpenDialog, and I
don't know anything about copied table. I have two
problems:

1. I can't count fields in copied table -
next code doesn't work:

Table1.FieldsCount;

It is called the trouble with syntax.

2. If I knew somewhere a count of fields in copied table,
would I be able to use the method FieldDefs.Add for
determination all needed fields within the next code:

for i:=0 to Table1.FieldsCount do
begin
 Add(Table1.Fields[i].FieldName, Table1.Fields
[i].FieldType, Table1.Fields[i].FieldSize, True);
end;

?

Are there other methods to make a copy exist?

* Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping.  Smart is Beautiful

 

Re:Copy of Paradox table during runtime


Use a TQuery:

Query1.SQL.Text :=
  'SELECT * ' +
  'INTO "NewTable.db" ' +
  'FROM "OldTable.db"';
Query1.ExecSQL;

"Helga" <j...@parks.lv> schreef in bericht
news:113e853a.e38bcb37@usw-ex0109-069.remarq.com...

Quote
> Help me, please!

> Within DELPHI 4 I have been trying to make a copy of
> PARADOX table together with all records during runtime. I
> choose a table for the copying through OpenDialog, and I
> don't know anything about copied table. I have two
> problems:

> 1. I can't count fields in copied table -
> next code doesn't work:

> Table1.FieldsCount;

> It is called the trouble with syntax.

> 2. If I knew somewhere a count of fields in copied table,
> would I be able to use the method FieldDefs.Add for
> determination all needed fields within the next code:

> for i:=0 to Table1.FieldsCount do
> begin
>  Add(Table1.Fields[i].FieldName, Table1.Fields
> [i].FieldType, Table1.Fields[i].FieldSize, True);
> end;

> ?

> Are there other methods to make a copy exist?

> * Sent from AltaVista http://www.altavista.com Where you can also find

related Web Pages, Images, Audios, Videos, News, and Shopping.  Smart is
Beautiful

Re:Copy of Paradox table during runtime


"Helga" <j...@parks.lv> skrev i en meddelelse
news:113e853a.e38bcb37@usw-ex0109-069.remarq.com...

Quote
> 1. I can't count fields in copied table -
> next code doesn't work:

> Table1.FieldsCount;
> It is called the trouble with syntax.

Try to spell it right: FieldCount

Finn Tolderlund

Re:Copy of Paradox table during runtime


Hi,

  Thank You very much for Your kind assistance.
  I'll follow Your advice.

Best regards,
Helga.

* Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping.  Smart is Beautiful

Re:Copy of Paradox table during runtime


Hi,
  Thank Your very much for Your kind advice.
  As usually, I have a trouble with my inattention.
Regards,
Helga.

* Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping.  Smart is Beautiful

Other Threads