Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How Create a dbf file from a txt file directly?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi, Friends,

I am interested to know how and if is possible create a
dbf file from a sdf .txt file.

For example, I created a list os items from a Pascal program
with colums of strings and integers and now I need export
this .txt file (in sdf format) to a .DBF file.

How I do this task? Could you please help me with your expertise?

Sincerely,

DeLucca
 
its simple in case u wish to append the data to the dbf file. lets say ur dbf file is origin.dbf and the text file is datafile.txt (line sequential format)

use either dbase or fox or in clipper use dbu to open the file origin.dbf.
next give the command

append from dtafile.txt sdf

and ur database is updated.


icici
 
Hi, Icici,

I know this way. Want I found it is more dificult. Imagine
I have a txt file in sdf format and I want to create a
dbf file without create any .dbf structure.

It is what I want.

Thank you very much.

DeLucca
 
If you know the structure layout of the TXT, you can use that information to create a DBF using the function DBCREATE.
 
your problem is that within a dbf file is more than just your data. It also contains a 'header' record that defines its fields, their order, their type (character, numeric, etc), and their width.

Your text, in sdf format, doesn't contain the header information, so you cannot simply convert a text file to a database file without some other program function to create the database.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top