QB 4.5 Printing Problems on Novell LAN 
Author Message
 QB 4.5 Printing Problems on Novell LAN

I've got a program written (not by me) in
QB 4.5 to print barcodes.  When it's used
with a locally-attached printer all is fine.
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>

Is there any way to get this to print to
a captured printer port.

Keith



Mon, 08 May 2000 03:00:00 GMT  
 QB 4.5 Printing Problems on Novell LAN


 > Newsgroups: comp.lang.basic.misc
 > Subject: [News] QB 4.5 Printing Problems on Novell LAN
 > Date: Thu, 20 Nov 97 04:08:02 -0600


 >
 > I've got a program written (not by me) in
 > QB 4.5 to print barcodes.  When it's used
 > with a locally-attached printer all is fine.
 > 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>
 >
 > Is there any way to get this to print to
 > a captured printer port.
 >
 > Keith

Hi, Keith!

Novell does not allow direct printing in this manner.
As a rool it has special queue to the net printer for different users
and instead of your code you have to do something like that:

        SHELL "CAPTURE S=SERVER Q=QUEUE"
        SHELL "COPY C:\QB45\FILENAME.TXT PRN"
        SHELL "ENDCAP"

Ask your Novell administrator what names to use instead of "SERVER"
and "QUEUE" which I've wrote in above example.

Bye,




Mon, 08 May 2000 03:00:00 GMT  
 QB 4.5 Printing Problems on Novell LAN

Quote:

> I've got a program written (not by me) in
> QB 4.5 to print barcodes.  When it's used
> with a locally-attached printer all is fine.
> 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>

> Is there any way to get this to print to
> a captured printer port.

> Keith

I have the same problem at our novell 4 at work. Depending on the
machine i print from i use either (win NT)

OPEN "LPT5.NET" FOR OUTPUT AS 9

or (win95)

OPEN "\DEV\LPT5" FOR OUTPUT AS
'(There is no \DEV directory on the disk)

Then i use normal PRINT #9,whatever$

/Freddie



Wed, 10 May 2000 03:00:00 GMT  
 QB 4.5 Printing Problems on Novell LAN

OPEN "LPT1:BIN" FOR OUTPUT AS #1
PRINT #1, "BARCODE OUTPUT INFORMATION"
CLOSE #1

BASIC v7.1 requires LPT1: as the device name.  Visual Basic, on the other
hand, requires only LPT1 as the device name.  BASIC v4.5 should behave
similar to v7.1.

The BIN keyword in v7.1 suppresses carriage returns which will cause your
barcode print to behave unpredicatably.  Visual BASIC, on the other hand,
does not allow nor need the BIN keyword.

An alternate method may be to set the WIDTH to a value larger than the
largest string that you wish to send to the printer and use LPRINT.

WIDTH 255
LPRINT "BARCODE OUTPUT INFORMATION"

Quote:
> > I've got a program written (not by me) in
> > QB 4.5 to print barcodes.  When it's used
> > with a locally-attached printer all is fine.
> > 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>



Wed, 10 May 2000 03:00:00 GMT  
 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
---------------------------------------------------------------------



Wed, 10 May 2000 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. QB 4.5 Printing to printer LPT2

2. Printing VGA graphics in QB 4.5

3. QB 4.0 Docs/QB 4.5 Wanted

4. want QB 4.5 QB 7.1 FOR FREE!!!

5. Where's QB.LIB in QB 4.5?

6. QB 4.5 Call Absolute Problem

7. Problem with QB 4.5 program

8. QB 4.5 .QLB libraries problem

9. QB 3.0--> 4.5 problems

10. Problem with QB 4.5?

11. problems about QB 4.5

12. QB 4.5 problems

 

 
Powered by phpBB® Forum Software