<NewObject Error: 200> Source=ProvideX.Script.1 in set oUDT = oScript.NewObject("CM_UDTMAINT_bus" ...

SOLVED

I'm getting the error message=<NewObject Error: 200> Source=ProvideX.Script.1 when accessing a UDT.  I just installed the client on this workstation for the first time, though I suppose I can try reinstalling.  I'm hoping I just have a small syntax error below.  Any thoughts?

Thanks!

*****************************************

retVal = 0
sSegment = ""

retVal = oSS.nSetModule("C/M")
retVal = oSS.nSetDate("C/M",oSS.sSystemDate)


retval = oSS.nSetProgram(oSS.nLookupTask("CM_UDTMAINT_ui"))


set oUDT = oScript.NewObject("CM_UDTMAINT_bus",oSS,"GL_UDT_Doctors")              '*********ERROR OCCURRS HERE*********

Parents
  • +1
    verified answer

    Oh, found it.  Pathroot was pointing to an old installation of Sage which did not have this UDT, of course.  Fixed it when I corrected the below:

    PathRoot = "\\server\Sage 2018\MAS90\" 'used as a workaround due to strange problems in prior version

    oReg.GetExpandedStringValue HKEY_CURRENT_USER,"Software\ODBC\ODBC.INI\SOTAMAS90","Directory",PathRoot 'updated path

Reply
  • +1
    verified answer

    Oh, found it.  Pathroot was pointing to an old installation of Sage which did not have this UDT, of course.  Fixed it when I corrected the below:

    PathRoot = "\\server\Sage 2018\MAS90\" 'used as a workaround due to strange problems in prior version

    oReg.GetExpandedStringValue HKEY_CURRENT_USER,"Software\ODBC\ODBC.INI\SOTAMAS90","Directory",PathRoot 'updated path

Children