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

Creating 1 text file from 2 databases 1

Status
Not open for further replies.

Phunt

IS-IT--Management
Mar 22, 2002
7
US
I have 2 databases (with different fields) that I need to put into 1 text file. I have tried COPY TO, but that overrides the text file. The text file must be comma delim.

Thanks in advance.
 
Look at the STRTOFILE function

HELP STRTOFILE()

It has an additional parameter to concatinate text.

You can make it a new line by including CR,LF

text = 'blah'
text = text + CHR(13)+CHR(10) + 'more blah'



Jim Osieczonek
Delta Business Group, LLC
 
I cannot seem to find the STRTOFILE() command. I am using Visual FoxPro 5.0 and 6.O.

Is there something that I am missing? Or, is there another way to do this?

Thanks
 
STRTOFILE() and FILETOSTR() were introduced in VFP 6.0 - they don't exist in 5.0. In 5.0, you'll need to use the low-level File IO functions (FOPEN, FREAD, FGETS, FPUTS, FWRITE, FCLOSE, etc.).

Rick
 
Thanks for all your assistance. I solved the problem by creating 2 text files and copying them to a third.

I really appreciate your efforts on my behalf.

Thanks again
 
That's an old trick that I completely forgot about. Sometimes we can get caught up in the new stuff we forget the past.

I'll give you a star for reminding me.

Jim Osieczonek
Delta Business Group, LLC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top