Board index » delphi » Converting from Foxpro to Paradox

Converting from Foxpro to Paradox

Hi,
    I want to convert existing Foxpro tables to Paradox tables using the
Batchmove component (Delphi 3 C/S) and add new fields to the Paradox tables
at run time.

What I'm doing...

1. Create a temporary alias for Foxpro files and seperate one for Paradox.
2. Create 2 TTable components (Foxtable & PDoxTable) to act as handles to
Files (tables) and set database, tabletype and active (value=false)
propertise as required.
2. Create a Tbatchmove and set propertise as follows
        Batch:=TBatchmove.create(self);
        with Batch do
        begin
                Source:=Foxtable;
                Destination:=PDoxtable;
                Transliterate:=true;
        end;
3. My code iterates through the 'Source' directory and sets the
Foxtable.Tablename property and sets the PDoxtable.Tablename property to the
same name (without path and with '.DB' extension).
3.1 Then, I used PDoxtables.fielddefs.add( ) to add additional fields which
are not in       the Foxpro tables.
3.2 Set the Batchmove.Mode property to batAppendUpdate and call the execute
method.

After all that, the foxpro tables are converted but the new fields are not
added....
Can anyone help me on this??

Also, if I want to keep the foxpro indexes do I have to create new indexes
using Pdoxtable.Indexdefs.add( ) ??

and   How to change the Data type or Kind for a field e.g. Integer to String

Thanks for urgent HELP!!

Henry

 

Re:Converting from Foxpro to Paradox


Quote
>3.1 Then, I used PDoxtables.fielddefs.add( ) to add additional fields which
>are not in       the Foxpro tables.
>3.2 Set the Batchmove.Mode property to batAppendUpdate and call the execute
>method.

>After all that, the foxpro tables are converted but the new fields are not
>added....
>Can anyone help me on this??

You can not add new fields this way.  You need to create the Paradox table first
using CreateTable method.   Then do the BatchMove to it.
You will need to create any indexes your table needs as part of the CreateTable.

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Other Threads