Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SET PRINTER TO NAME fails with error 1957
Message
From
17/04/2013 21:24:33
 
 
To
17/04/2013 17:13:00
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01571156
Message ID:
01571290
Views:
45
Problem solved, and I still would have been running down phantoms without your help Sergey.

My user had his machines confused. His testing of my "fixes" was being done on the 64 bit Win-7 machine ... not the 32 bit version that he thought he was using. Even better, the original Vista server machine (print and data server) that they had gone back to, to keep things running, turned out to be a 32 bit Win 7 machine. The whole problem was that the Win-7 64 bit "Professional" OS doesn't have an Epson LQ-590 driver, and that's the machine that I was trying to fix!

Thanks
Bob


>Now that I have some direction, I'm starting over with the tracking, and working on the assumption that something was screwed up in the setup ... printer driver install, pointing to write printer, and some other environmental issues. I'll be back when I get more confirmed info. Thanks for letting me know that TO NAME does work for a printer on a Win-7 machine. That was a huge help.
>
>Bob
>
>>Are you sure that gcDefaultPrinter holds correct name of the printer? Did you check it with GETPRINTER() ?
>>
>>>I have multiple users connected to a shared data server, that also has three printers attached. The user machines were all switched over from Vista machines to Win-7 32 bit machines, and one to a Win-7 64 bit machine ... all without without incident. The client has recently switched the server to a Win-7 32 bit system, and that's when the print spooler problems started. Typical code used to switch printers is:
>>>
>>>* send output to Label Printer
>>>gcDefaultPrinter = alltrim(MyPrinters.cLabels)
>>>SET PRINTER TO NAME (gcDefaultPrinter)
>>>
>>>The first fix attempt was to go after the printer driver for the Epson LQ-590 impact printer, that I control with good old escape codes for on the fly font size changes on longer lines to keep them within the bounds of the labels (Company names and other variable length fields).
>>>
>>>Unfortunately, Epson doesn't seem to have a download for a Win-7 driver for this printer (that they still manufacture). A search told me that there was a Win-7 driver for this printer in Win-7 itself, and that if installed with the Win-7 printer wizard, all would be well. My user is somewhat remote from me, and I'm just assuming that he did that correctly.
>>>
>>>With that behind me it still didn't work (still producing an error "1957 - Error accessing printer spooler" message when the TO NAME line got executed). Interestingly, the printer target does get switched, but the subsequent attempt to switch back to the report printer would not happen.
>>>
>>>I then fought with trying to get a WIN32API setdefaultprinter approach to work (although I'd prefer not to change the servers default printer, which could led to some surprises for the other users). I've been having trouble with doing this anyway, so I decided to ask for some help.
>>>
>>>Your thought of SET PRINTER TO NAME not being a problem makes me thing that the printer driver might still be the problem.
>>>
>>>Any thoughts would be greatly appreciated.
>>>
Previous
Reply
Map
View

Click here to load this message in the networking platform