
QB 4.5 Printing Problems on Novell LAN
Quote:
> When I print to a "captured" printer on a
> Novell Netware 3.12 workstation it bombs
> with a "Device I/O error".
> The statements to print are
> OPEN "LPT1" FOR BINARY AS #1
> and
> PUT #1, ,<variable name>
I suspect the problem is rooted in the fact that you are opening the
port as BINARY, since this implies both read and write access to the
file handle being opened. Changing the OPEN statement to:
OPEN "LPT1" FOR OUTPUT AS #1
And replacing the PUT's with:
PRINT #1, <variable name>;
Using this method, QB might "help" you by automatically inserting a
CR/LF pair if it thinks you've exceeded the width of the printer. In
powerbasic, the WIDTH "LPT1:",255 command would disable this -- maybe QB
has somethig similar.
Another option would be to change the OPEN statement to:
OPEN "<tempdir>\BARCODES.TXT" FOR BINARY AS #1
Replacing <tempdir> with the name of a temporary direcory, of course. At
the end of the run, do
PUT #1,, ""
This puts and EOF at the end of the file. Close the file, and do this:
SHELL "NPRINT <tempdir>\BARCODE.TXT /Q=<print que name> /NB /NFF /NT"
Hope this helps.
---------------------------------------------------------------------
|
| Be nice to your children. Someday, they will choose your rest home
---------------------------------------------------------------------