set_printer INIT Error -4 in OI 7.01 (OpenInsight 32-Bit)
At 27 JAN 2005 01:44:49PM John Bouley wrote:
We are getting an error message while trying to issue a set_printer("INIT")
First: Load Library (vsprint7.ocx) failed, GetLastError returns 0x00000020
A -4 is returned from the call to set_printer.
Other reports work fine. Any ideas?
Code follows:
parm1='
parm2='parm3=.25":@fm:".5":@fm:".25":@fm:".5"parm4='parm6=PrinterNameinit=set_printer("INIT",'','',Parm3,'',parm5,parm6)If Init < 0 Thencall msg(@window, "Error ":init:" returned on Printer INIT")Returnend
At 27 JAN 2005 03:58PM Matthew Crozier wrote:
Looks like parm5 is unassigned.
M@
[img]http://www.vernonsystems.com/images/logo_main.gif[/img]
At 27 JAN 2005 04:25PM John Bouley wrote:
You pass the test
![]()
Just kidding, Parm5=2. Forgot to paste that section…
I did find the problem. Thank you to Bob Orcini.
Turns out I couldn't manually register vsprint7.ocx. Looking at the registry we could not see any problems. So I copied the vsprint7.ocx to my C: drive and it registered! At that point I thought I might have something to do with Windows Firewall. That was a "red herring" since I can now register at will from the network drive???
To make a long story short the error had nothing to do with Set_printer or OIPI except that is where the symptom was manifesting itself. The report in question was calling Rlist("SELECT TABLE BY NON EXISTENT COLUMN",5,
,
,'').Apparently, whatever happens in Rlist when you try and sort a table on a non-existent column it messes memory up. This was what was causing the Set_printer to fail and to mess with VSPrint7.ocx.
Maybe when Rlist was originally written the programmer never thought that someone would be stupid enough to sort on a non-existent field but here we are…
Thanks,
John