Board index » delphi » Text files to Paradox tables

Text files to Paradox tables

Hello,
  Can anyone explain to me how to make the TBatchmove work? I'm trying to
copy the contents of a text file into a Paradox table.
I've read the ASCIIDRV.TXT (and Borland's TI 2844) and set up a text file
and schema file for a fixed format file ( CUSTOMER.TXT and CUSTOMER.SCH). I
put two tables on my form, and a TBatchMove component.  I set the source
table as follows:
DatabaseName :  DBDEMOS
Name: Table1
TableName: Customer
TableType: ttParadox

The destination table as follows:

DatabaseName :  Accounting
Name: Table2
TableName: Cust
TableType: ttASCII

Cust.sch as follows:
[CUST]
FileType=Fixed
CharSet=ascii
Field1=Customer No,Float,20,04,00
Field2=Name,Char,30,00,20
Field3=Phone,Char,15,00,145
Field4=First Contact Date,Date,8,00,160

When I try to set Table2.active to true I get an invalid filename error.
When I run the app, I get the following: EDBEngineError with message
'Invalid filename'
Is there something I need to add to the uses clause? I'm using D1 and have
also tried it with D3 without any luck.
I must be overlooking something simple!
TIA
Ron

 

Re:Text files to Paradox tables


On 4 Feb 1998 20:12:38 GMT, "ron tanner" <rtan...@dsmd.dsmd.state.al.us>
wrote:

Quote
>...set up a text file
>and schema file for a fixed format file ( CUSTOMER.TXT and CUSTOMER.SCH). ...
>Cust.sch as follows:
>[CUST]
[...]
>When I try to set Table2.active to true I get an invalid filename error.
>When I run the app, I get the following: EDBEngineError with message
>'Invalid filename'

If the ASCII table is named CUSTOMER.TXT, the filename parameter in the
schema file must be CUSTOMER.

  [CUSTOMER]

**************************************************************************
Steve Koterski
Borland International, Inc.
http://www.borland.com/delphi
(Remove the "SPICEDHAM2" from the address. Death to spam-bots!)

Re:Text files to Paradox tables


Quote
"ron tanner" <rtan...@dsmd.dsmd.state.al.us> wrote:
>When I try to set Table2.active to true I get an invalid filename error.
>When I run the app, I get the following: EDBEngineError with message
>'Invalid filename'
>Is there something I need to add to the uses clause? I'm using D1 and have
>also tried it with D3 without any luck.

Hi Ron, I've found that you don't need to open the source and
destination Tables.  BatchMove opens them as required.  If you open
Table2 when the table does not exist -> error.

Regards,
Chris Roberts

Re:Text files to Paradox tables


You need to set the table name for Table2 to CUSTOMER.TXT (the actual
name of the ASCII file).  Your message said that table1 is the source
and table 2 is the destination but the rest of the message implied
that the reverse is true.

Bill

(Sorry but TeamB cannot answer support questions received via email.)
(To send me email for any other reason remove .nospam from my address.)

Other Threads