in reply to Re^5: problem with script transfered from VBS
in thread problem with script transfered from VBS

It throws:
C:\>perl cmp2.pl value($psProxyName) failed - Win32::OLE(0.1709) error 0x8002000e: "Inv +alid numbe r of parameters" in METHOD/PROPERTYGET "Value"Meter proxy created having the ID: Script Finished
What does it mean? and how do I walk around? Thanks in advance!

I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction

Replies are listed 'Best First'.
Re^7: problem with script transfered from VBS
by Bloodnok (Vicar) on Aug 07, 2008 at 09:56 UTC
    Hi ,

    You gave value() one parameter - $psProxyName - the library was clearly expecting either more or less than that...if more, of what form they take I have no idea.

    It could, of course, be that the OLE model is similar to the Excel OLE model, in which case, value() is an accessor method, taking no args, to return the current value...and if that's so, then you could possibly (last throw of the dice time) try replacing $rs->Fields('AEName')->value($psProxyName); with $rs->Fields('AEName')->{value} = $psProxyName; - note the change of value() to {value} i.e. from method invocation to hash member.

    Other than that, I think you need to look at the COM model for your application for further information...Node Using Win32::OLE and Excel - Tips and Tricks gives an excellent overview of the use of Win32::OLE with Excel - from whence I 'borrowed' the above last ditch attempt to help.

    A user level that continues to overstate my experience :-))
      Thanks for your tireless reply!
      After I study it a whole day, I decided to give it up and turn to use DBI.( although it raised new problem :()
      Anyway, Thank you for your kindly help!

      I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction
Re^7: problem with script transfered from VBS
by Anonymous Monk on Aug 07, 2008 at 04:00 UTC
    How can "Invalid number of parameters" be ambiguous?