Re: [U2] How do you verify windows printer is good before fatal error by PRINTing to a bogus printer.

Anthonys Lists <[email protected]>
Newsgroups gmane.comp.db.u2.general
Message-ID <[email protected]>
On 28/01/2014 20:59, Charles Stevenson wrote:
> Anthony pretty much nailed how we're doing it.
>
> But my original question is still unanswered.
> I want to make sure it's a valid printer before I start printing to it.
> I think I problably need to do something like
>     EXECUTE "DOS /C [some-command] \\MY_PRINT_SERVER\PrinterName" 
> CAPTURING DOSMSG
>     IF DOSMSG = [something bad] THEN  . . .
>
> I was hoping someone in this august body had crossed that bridge before.
>
We never had that problem.

I had a PRINTER subroutine or suchlike that accessed a printers file 
with all the parameters. Any programatic (or user command line) attempt 
to access a printer was via my stuff, that checked this file, and set 
things up accordingly.

So as far as eg accounts was concerned, they had the ACCOUNTS printer. 
Whenever anything changed, I simply changed the ACCOUNTS entry in the 
parameter file. Very useful, because on the odd occasion when a printer 
went down I just made a temporary change to the file and everything got 
diverted :-)

If tyou're interested, let me know and I'll see if I can find the code - 
I know I had it but it's a long time ago ...

Cheers,
Wol
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.