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

email or CD

Status
Not open for further replies.

iolair

IS-IT--Management
Oct 28, 2002
965
US
We currently have a query program that writes out a report to a floppy disk. We have had people ask for this list either via email or CD. Is there a way to do this? I read the post about blat, so I'm going to try that. Any thoughts on another way to do this? Here's our query code:

SELECT Organztn.org_id, Organztn.org_county, Organztn.org_name,;
Organztn.org_type, Organztn.contact1, Organztn.phone1_bus,;
Organztn.fd_phone, Organztn.ml_add1, Organztn.ml_add2, Organztn.ml_city,;
Organztn.ml_state, Organztn.ml_zip, Codes.table, Codes.tab_cval1,;
Codes.tab_key;
FROM Organztn, Codes;
WHERE Codes.tab_key = Organztn.org_county;
AND (Codes.table == "CNTY";
AND Organztn.org_type IN ("C ","CV","CO","V ",'FC"');
AND Organztn.org_subid == "00";
AND Organztn.org_status == "A";
AND Organztn.no_pub = " ");
ORDER BY Organztn.org_id;
INTO CURSOR DISC
REPORT FORM DISCLST.FRX TO FILE A:\ORGLST.TXT NOCONSOLE NOEJECT

I've tried changing the above to
REPORT FORM DISCLST.FRX TO FILE D:\ORGLST.TXT NOCONSOLE NOEJECT

But it doesn't work. It does nothing. I'm not a programmer, but is it possible to make calls to external programs from FoxPro 2.5? Like .bat, .exe, .com, .vbs??

TIA

Iolair MacWalter
Network Engineer
 
If you send it to a CD, you'll probably have to write it out to a temp file somewhere on your hard drive, then manually write it to a CD.
For an email example, go to the FAQ's and look for email posts.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Thanks. I saw the post about Blat, and I'm going to try that. I wonder why it'll write out to a floppy, no problem, but not a CD?

Iolair MacWalter
Network Engineer
 
Well, because CD's are not really treated as fixed or removable media. More like a backup type device.
And since everything goes through the driver, unless the driver can treat the CD as an immediately read/write drive, it gets 'staged' then written.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Ah, I see. Makes sense. I figured it might have something to do with the fact that when 2.5 was written, CD's weren't very common.

Iolair MacWalter
Network Engineer
 
To answer the other half of your question, you can run an external program with ! or RUN. For example, if you could write a batch file that copied your text file to CD then you could do thi sin Fox:

Code:
!copyToCD.Bat

but it's a crude technique. The "!" shells out to DOS and just blindly runs what you tell it to run.

Geoff Franklin
 
I'll give it a try. Thanks for the tip.

Iolair MacWalter
Network Engineer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top