Scripting

  • 1.  BOI adding an item to inventory - what should the

    Posted 01-24-2018 08:57
    BOI adding an item to inventory - what should the lookup task and object be? I have tried various combinations of IM_Item and CI_ItemCode and keep getting errors: retVal = oSS.nSetProgram(oSS.nLookupTask(""IM_Item_ui"")) 'retval = 0 CI_Item_bus = oPVX.NewObject(""CI_ItemCode_bus"", oSS) 'gets NewObjectError 90


  • 2.  RE: BOI adding an item to inventory - what should the

    Posted 01-24-2018 09:09
    is this vbscript? have you set retval to 0 prior to looking up the task? if not vbscript, which datatype are you declaring it as (integer will cause problems)? Is this Standard or Advanced? what path are you using in the oPVX.Init method (client or server)? Regarding the error, error 90 can indicate ""class definition not found"". Which might mean you are using the client or workstation's MAS90\Home directory. Here is my preferred method of initializing providex session using vbscript. ------------------------------------------------------------------------------------------------- Dim oShell : Set oShell = CreateObject(""WScript.Shell"") Dim sPath : sPath = """" : sPath = oShell.RegRead(""HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\SOTAMAS90\Directory"") Dim oPVXSession : Set oPVXSession = CreateObject (""ProvideX.Script"") oPVXSession.Init(sPath & ""\Home"") -------------------------------------------------------------------------------------------------


  • 3.  RE: BOI adding an item to inventory - what should the

    Posted 01-24-2018 10:24
    Premium. Init path is to server. The lookuptask line returns 0, but oSS.sLastErrorMsg is blank


  • 4.  RE: BOI adding an item to inventory - what should the

    Posted 01-24-2018 10:39
    What version of Premium? Does it fail on other Lookup Tasks / objects too? If so, this is probably the issue with the MasSql.settings file where the CONNECT= Driver line needs fixing. I'll find it when I get a chance. Also posted the edit on a BOI / SQL thread few years ago if you can find it.


  • 5.  RE: BOI adding an item to inventory - what should the

    Posted 01-24-2018 11:36
    Found it - the proper mix of I/M and C/I is to be all I/M Set Module, etc until the CI_ItemCode_bus


  • 6.  RE: BOI adding an item to inventory - what should the

    Posted 01-24-2018 11:48
    Now on to weirder stuff: CBool(CI_Item_bus.nWrite()) evaluates to false but the item is written


  • 7.  RE: BOI adding an item to inventory - what should the

    Posted 01-24-2018 12:07
    What is the actual integer value returned from the nWrite?


  • 8.  RE: BOI adding an item to inventory - what should the

    Posted 01-24-2018 12:33
    it returns 0


  • 9.  RE: BOI adding an item to inventory - what should the

    Posted 01-24-2018 12:36
    and SetKey is returning 2 and you're not writing the record anywhere else?


  • 10.  RE: BOI adding an item to inventory - what should the

    Posted 01-24-2018 13:41
    correct