Sage 100

 View Only
  • 1.  Custom Office Script and SQL

    Posted 04-09-2021 13:46
    I am in the need of some SQL and scripting help.

    I have an external custom office script that creates a new sales order. It works great on the SQL server, but on the workstation.

    Of course, I get a generic error 200.

    I am login to the server and workstation as the same user.
    The acct share and security are set to everyone full control

    The server sota.ini file  contains the following
    DRIVER=SQL Server Native Client 10.0

    The workstation sota.ini file contains the following
    [MSSQL]
    DRIVER=SQL Server Native Client 11.0

    The massql.setting has the following information.
    CONNECT='Driver={SQL Server Native Client 11.0}';

    The company is set to allow external access

    The server has both SQL Server Native Client 10.0 and 11.0 ODBC drivers loaded.
    The workstation only has 11.0. I did try and find 10, but the download is not available anymore.

    I am thinking it has to be something with network permissions or how MAS200 runs.

    Any ideas would be appreciated. 

    Snipit of script

    'Create ProvideX COM Object
    Set oScript = CreateObject ("ProvideX.Script")

    'The Init method must be the first method called
    ' Please remember to correct the MAS90\Home path
    sPath = "\\FILESERVER\Acct\v2020\MAS90"
    oScript.Init(sPath)


    'The Session object must be the first MAS 90 object created
    Set oSS = oScript.NewObject("SY_Session")

    #SQL #custom office
    ​​​​

    ------------------------------
    Michael Davis
    Warren Averett Technology Group
    Birmingham, AL
    ------------------------------


  • 2.  RE: Custom Office Script and SQL

    Posted 04-09-2021 15:21
    The sPath should go out to the \Home folder. Also for the INI file you should match the version number to the one in massql.Setting file. So with BOI I believe it uses the PVX.INI in the server's \Home folder. So adjust that one to 11.0 in case it says 10.0.

    ------------------------------
    Alnoor Cassim

    Email: alnoor@asifocus.com
    Ph: 949-689-9887
    Orange County, CA
    ------------------------------



  • 3.  RE: Custom Office Script and SQL

    Posted 04-09-2021 15:38
    The Pvx.ini, massql.setting, and workstation sota.ini now all say Driver={SQL Server Native Client 11.0}

    I tried with and without the home directory but same error message

    I feel like is a simple fix, but I am not seeing it.

    Thank you
    Michael


    ------------------------------
    Michael Davis
    Warren Averett Technology Group
    Birmingham, AL
    ------------------------------



  • 4.  RE: Custom Office Script and SQL

    Posted 04-09-2021 16:12
    Also, I updated all the Pvx.ini files (c:\windows, Mas90\home, etc) to be the Driver={SQL Server Native Client 11.0}

    Thank you
    Michael

    ------------------------------
    Michael Davis
    Warren Averett Technology Group
    Birmingham, AL
    ------------------------------



  • 5.  RE: Custom Office Script and SQL

    Posted 04-09-2021 16:17
    Edited by Alnoor Cassim 04-09-2021 16:18
    Try just starting Sage itself in Mas90 mode, from the workstation, instead of running the BOI script. Possibly you'll see an error doing that which is more recognizable, and maybe that is related to the script error. Maybe not.

    ------------------------------
    Alnoor Cassim

    Email: alnoor@asifocus.com
    Ph: 949-689-9887
    Orange County, CA
    ------------------------------



  • 6.  RE: Custom Office Script and SQL

    Posted 04-09-2021 18:38
    Wow Michael that was a doozy! Glad it's over with and working now. Never have seen where Sage failed to decrypt the password in Massql.settings file, albeit temporarily. Maybe SQL Server 2019 had something to do with it.

    ------------------------------
    Alnoor Cassim

    Email: alnoor@asifocus.com
    Ph: 949-689-9887
    Orange County, CA
    ------------------------------