Board index » delphi » Copying a paradox table to a dBase IV-Table

Copying a paradox table to a dBase IV-Table

Id like to convert a paradox table to a dBase IV table and chose Delphis
batchmove component
to do this.
To ensure that a dBase IV-Table is created I inserted the code
  DestTable.TableLevel := 4.
All works fine, but if the source paradox table contains a field which value
is required
automatically a dBase for Windows Table is created.
Is there a way to avoid this behaviour and ensure the creation of a table
that can
be read by dBase IV?

Many thanks
Dominik Luebbers

 

Re:Copying a paradox table to a dBase IV-Table


Quote
Dominik Lbbers wrote:

> Is there a way to avoid this behaviour and ensure the creation of a table
> that can
> be read by dBase IV?

Of course you don't have to include all the fields from the source
to the destination dBase IV table, but you can choose what you
take along.

One faint idea (very faint, never tested), would first read the source
table to TQuery, and then use SQL's CAST to turn those problematic
fields to some other type, and then BatcMove this Query to dBase IV table.

Markku Nevalainen

Re:Copying a paradox table to a dBase IV-Table


I tried to copy a paradox tables content to a dBase IV table a different
way:

Using two TTable-Components (lets call them Source and Dest) and a
TBatchMove-Component,
that connects these tables. Its property Mode is set to batCopy.
Lets say a source table points to a valid paradox table. I use the
following code to
do the copy:
  Dest.TableName:='c:\buffer\abc.dbf';
  Dest.TableType := ttdBase;
  Dest.TableLevel:=4;
  BM.Execute;
This works fine, that means no exception is thrown. But trying to open this
table with
the database explorer fails with the message "table cannot be opened;
parameter mismatch"
(translation of the german error message).
Is this a bug?
You see, I dont want to translate the paradox table by foot. This was
possible but you
have to take care of the maximum length of field names (on the other hand a
field name must
be unique) and you have to map all paradox field types to suitable dBase
field types which
means a lot of work?

Any ideas how to avoid this harm?  Maybe the above way is the right one and
Im doing something wrong?

Thanks
Dominik Luebbers

Re:Copying a paradox table to a dBase IV-Table


On Mon, 2 Aug 1999 16:38:44 +0200, "Dominik Lbbers"

Quote
<domi...@pool.informatik.rwth-aachen.de> wrote:
>All works fine, but if the source paradox table contains a field which value
>is required automatically a dBase for Windows Table is created.
>Is there a way to avoid this behaviour and ensure the creation of a table
>that can be read by dBase IV?

No.  Required fields are not supported by dBase IV.

Jan

Other Threads