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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visual Dbase 5.5

Status
Not open for further replies.

armylogman

Technical User
Feb 16, 2005
34
US
I am trying to create a text file using a variable in Db 5.5 and am having no luck.

Thanks in advance for any and all help

 
You can output to file several ways:

1. outputting contents of a dbf file to a text file
LIST myField1,myField2 To FILE myText.txt
You can specify the file path name and use macro substitution to create a filename on the fly

e.g.

myFile = "c:\dbase\data\names.txt"

LIST surname, firstname TO FILE &myFile

will create a text output to the specified file name.

2. You can output data using the ? and ?? commands

SET PRINTER ON
SET TALK OFF
SET PRINTER TO FILE myText.txt
? field1,field2
skip
? field1,field2
SET PRINTER TO
SET PRINTER OFF

In the 2nd way you can program other text to out put e.g.
SET PRINTER ON
SET TALK OFF
SET PRINTER TO FILE myText.txt
?
?? "Surname : " AT 5
?? SURNAME AT 17

SET PRINTER TO
SET PRINTER OFF

HTH

**********************************
There is more than one way to skin a cat...but who wants a skinned cat?
 
I need a copy of dBase 5.5, Preferably 32 bit. Can anyone prove me with a copy?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top