Sage 100

 View Only
  • 1.  Scripting IssueA customer needs to bring in a sa

    Posted 07-16-2014 08:44
    Scripting Issue A customer needs to bring in a sales order from a SQLdatabase in Sage 2013 using the BOI. The SQL server is separate from the MAS server, both in our data center environment. We believe permissions are OK. Our code is doing: PathHome = ""\\csp65masdemo\c$\Sage\Sage 100 Standard ERP\MAS90\Home"" Set oScript = CreateObject (""ProvideX.Script"") <-- The code fails here oScript.Init(PathHome) Any ideas? Do we need to map the drive or use an IP address? @Sage100Routine


  • 2.  RE: Scripting IssueA customer needs to bring in a sa

    Posted 07-17-2014 11:27
    I would guess a user permission issue. Does it have rights to the admin share? I also have a superstition to try to avoid white space and symbols as much as possible, so I would create a share on the Sage 100 Standard ERP folder and rename it to Sage100StdERP. I've never needed to do it, but if you think it's a DNS issue, then trying the IP shouldn't hurt.


  • 3.  RE: Scripting IssueA customer needs to bring in a sa

    Posted 07-17-2014 11:31
    Our BOI boilerplate is: 'Login Definitions strUser = ""mas-user"" strPass = ""pass"" strCompany=""ABC"" 'Program Variables r = 0 cnt = 0 strPathRoot = """" strAcctDate = """" QUO = Chr(34) ' Quote character Const HKEY_CURRENT_USER = &H80000001 'Object Definitions oReg = 0' Registry Access oScript = 0' MAS Primary Object #1 oSession = 0' MAS Session Object 'Get MAS 90/200 info from ODBC SOTAMAS90 DSN Set oReg = GetObject(""winmgmts:\\.\root\default:StdRegProv"") oReg.GetExpandedStringValue HKEY_CURRENT_USER,""Software\ODBC\ODBC.INI\SOTAMAS90"",""Directory"",strPathRoot Set oReg = Nothing 'Create ProvideX COM Object and Session Set oScript = CreateObject (""ProvideX.Script"") oScript.Init(strPathRoot & ""\Home"") Set oSession = oScript.NewObject(""SY_Session"") 'Grab the user's information r = oSession.nSetUser(strUser,strPass) If r = 0 Then ErrorHandling(""Setting User/Pass for "" & strUser) r = oSession.nLogon() ' Set the company, module date and module for the Session using info from Login Definitions above strAcctDate = YEAR(Date()) & Right(""0"" & Month(date()),2) & Right(""0"" & DAY(date()),2) r = oSession.nSetCompany(strCompany) If r = 0 Then ErrorHandling (""Setting Company to "" & strCompany)