Dear adviser

I want to Convert Content of *.Txt File to *.dbf file
can u help me in this regards,

Thanks & Regd,

Pandey G.D.

my mail id is : gdpandey@hngil.com

Re: Conversion of *.Text file to *.dbf File by Cindy

Cindy
Mon Jan 05 06:51:00 CST 2004

In news: 02ed01c3d37e$dc1ca270$a001280a@phx.gbl,
G.D.PANDEY <gdpandey@hngil.com> wrote:
> I want to Convert Content of *.Txt File to *.dbf file

Hi GD,

One way to do this is to create a table in FoxPro that has the structure you
want and then use APPEND FROM the text file, but that won't work if you're
not sure of the file structure. Another way is to use Excel automation to
open the file in Excel and SAVE AS a DBF file.

--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy.winegarden@mvps.org www.cindywinegarden.com




Conversion of *.Text file to *.dbf File by Leonidos

Leonidos
Mon Jan 05 08:06:27 CST 2004

Try to write this code.

txtfile="c:name.txt"
fpi=fopen(txtfile,10) && 10 - read only

lines=fgets(fpi)
txtvalue=left(lines,5) && 5 - line lenght
insert into your_table (your_field) values (txtvalue)
=fclose(fpi)

This code read only one line.
For many lines try use "for... endfor"
==================

Leonidos@gazeta.pl