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

problems with printers and win2k

Status
Not open for further replies.

rargi2002

Programmer
Mar 21, 2002
15
AR
Hello my name is Ramón and i have a problem with printers and windows 2000 and fox. I have a LAN in my Job: 1 server and 7 workstations. the server is running under win2k server,5 ws under win98 and 2 under windows 2000 pro. The server has two printer Epson LX-300 one in LPT1 and the other one in LPT2. The printer in LPT1 is used with a sort of documents and works excellent in the network. The problem is the second printer(LPT2), which is used only to print invoices. I use the next statement in my program

set printer to “LPT2:”
set printer to \\server\impre2=lpt2:

server=name of the server
impre2=name of the printer in the network(sharing)

Windows2000 pro does not recognize the statement above. I tried to suppressed them and everything works fine in the server, but the problem appears when I try to print from a ws, because the ws does not find the printer(impre2) in the network. Using win98 there is no problem at all. What sould I do?

Any help will be appreciated
Thanks for your time
 
It seems W2k is not as forgiving as the older versions of Windows. Although I do not have the FoxPro books with me, so I'm not sure how much of this might help, but try adjusting your code a bit to see if any of these small changes work:
Code:
SET PRINTER TO LPT2
* local printer only unless you reassign port with NET USE
or...
Code:
cDest="LPT2"
SET PRINTER TO &cDest
* local printer only unless you reassign port with NET USE
or...
Code:
cServer="myserver"
cPrinter="printersharename"
SET PRINTER TO NAME \\&cServer\&cPrinter
or slightly modified...
Code:
cServer="myserver"
cPrinter="printersharename"
cPrintPath="\\"+cServer+"\"+cPrinter
SET PRINTER TO NAME &PrintPath

dbMark
 
When you go to the printer properties in any version of Windows, you can capture the printer port. Once , you capture the port, you can assign it to lpt1 or lpt2. Then any calls to LPT2 will go to the network printer you designate.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top