07-20-03, 18:08 #1Registered User
- Join Date
- Jul 2003
Unanswered: Printing to UNC Printers in Paradox 4.5
Hello fellow DBers,
I haven't played with Paradox 4.5 in years but I have some clients that have upgraded their networks and PCs and are forceing the issue of UNC printer path names.
I'm aware on how to use LPT mapping to print to UNC printer names, but I have more than 15 printers that need to be printed to and as far as I know, there's only 3 LPT ports that you can map. My code will look at certain field values and determine which one to print to and generate code to pass to a RUN command. My problems occur when I shell out with the "RUN" command and try to copy a text file (already generated) to a UNC path name. I get no errors, but it's not working.
Here's an example:
runcmd = "copy c:\\privdir\\report.txt \"\\\\servername\\share name\""
RUN NOREFRESH runcmd
It appears to parse correctly by viewing the runcmd variable, but is not working....
08-27-03, 17:05 #2Registered User
- Join Date
- Aug 2003
- Bologna - Italy
Two things come to my mind:
1)If you're using an NT series of windows, i'quite sure you can have many more LPTx than 3, so it may solve your problem.
2)If you're running a text-only report, as it seems, i'd use calls to the windows API to create the print job by calling them, and then passing the file; or if you need it, there's a nice command line tool called RawPrint on the MS site, which works by sending to the desired printer a file.
In all these responses i presume you're running in a dos box under windows, if you're not, sorry, but i don't have any advice.
The only failure is not trying to do it.