Board index » delphi » Best way to import a Text File in a DBF File

Best way to import a Text File in a DBF File

Could somebody explain me how transfer records from example1.edi to edi.dbf

example1.edi structure
1  description1   phone1     adress1
2  description2                   adress2
3  description3   phone3
4  description4                   adress4

 

Re:Best way to import a Text File in a DBF File


It is a bit difficult to tell what the format of the EDI file is from
the text in your message. It may be fixed length ASCII, however, there
are spaces between the fields. I cannot tell if this is padding at the
end of each field or some invisible delimiter character. That said,
you should be able to read the file using the Pascal ASCII file I/O
routines AssignFile, Reset, Rewrite, Readlin and Writeln. To access
the dBase files you can use the BDE or a third party database engine.

On Tue, 4 Jun 2002 13:02:49 -0700, "Reynaldo Sepulveda"

Quote
<reyna...@rbsystems.com> wrote:
>Could somebody explain me how transfer records from example1.edi to edi.dbf

>example1.edi structure
>1  description1   phone1     adress1
>2  description2                   adress2
>3  description3   phone3
>4  description4                   adress4

--
Bill (TeamB)
(TeamB cannot respond to questions received via email)

Re:Best way to import a Text File in a DBF File


Your edi-file is a standard text file with fixed width of every column. So
you can:
1. use a TBatchMove component and open your edi-file as ASII-table. For this
task you must create a scheme-file where you'll describe a structure of your
edit-file. See a help file for BDE for details

2. as alternative I suggest you to use my SMImport suite
(http://www.scalabium.com/smi) - your file will be loaded there without any
problems...

--
With best regards, Mike Shkolnik
E-Mail: mshkol...@scalabium.com
WEB: http://www.scalabium.com

Reynaldo Sepulveda <reyna...@rbsystems.com> D???
???Y??:3cfd011d$1_1@dnews...

Quote
> Could somebody explain me how transfer records from example1.edi to
edi.dbf

> example1.edi structure
> 1  description1   phone1     adress1
> 2  description2                   adress2
> 3  description3   phone3
> 4  description4                   adress4

Other Threads