Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SET PRINTER TO NAME fails with error 1957
Message
 
 
À
16/04/2013 23:00:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01571156
Message ID:
01571193
Vues:
65
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.
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform