Sage 100

 View Only
  • 1.  Connecting SQL to Sage 100

    Posted 01-15-2025 14:51
    Here is what we have going on:
    1. Sage 100 Advanced 32 bit - Sage 2024 PU1. 
    2. SQL Express 64 bit. I believe it's SQL 2019.
    3. Installed  Sage 64 bit ODBC connection and setup a System DSN for this.
    4. When in to create the Linked Server BUT and it says connection was successful BUT it doesn't actually pull up any of the tables. 
    5. SQL and Sage are loaded on the same server.
    6. I also tried doing this through a different server and SQL connection with the same results. 
    7. Windows firewall is off on the server. 
    Unfortunately, this customer has a ton of addons and custom mods so going to 64 bit is not an option. The customer is trying to mine data out of Sage (and needs it for a few things). I cannot figure out what I'm missing here BUT this is a huge upgrade, they are scheduled to go live Thursday night/Friday morning and I have to delay the whole upgrade - which would be horrifying. 
    If anyone can help on this, please let me know. I'll pay for the support time so that we can get this fixed. 
    Thanks
    Tara


    ------------------------------
    Tara Schinkel
    Consultant
    Stewart Technologies, Inc.
    ------------------------------


  • 2.  RE: Connecting SQL to Sage 100

    Posted 01-15-2025 15:02

    In ODBC 64-bit, in your System DSN that points to a specific Sage company, if you click on Debug tab \ Test Connection button, does it silently succeed (no typing company or credentials) with a positive table count? If that's good, then do you have the Linked Server configured for Provider = Microsoft OLE DB Provider for ODBC Drivers", Product Name = (your ODBC name), Data source = (your ODBC name), and set to "Be made without using a security context"?

    Here's example screenshots from my machine:



    ------------------------------
    Steve Iwanowski, NextStep Technology Advisors, aka DSD Lancaster PA ¯\_(ツ)_/¯
    ------------------------------



  • 3.  RE: Connecting SQL to Sage 100

    Posted 01-15-2025 15:07
    Yup - I have all of that and I get either one of two behaviors:

    1. It links right away BUT it doesn't actually show anything for the database.
      OR
    2. It says Executing but even if I let it go for a little bit, nothing happens.

    I do want to point out that this was working in their Sage 2019 system and I've already checked inside of Sage with regards to usual stuff there (allow external access etc). 


    Tara Schinkel, CPA,   Accounting Systems Lead & CFO

     

    Stewart Technologies, Inc.

    Champions for your efficiency.

    main: 410.309.9550 x 1104   

    stewarttechnologies.com   |   Follow Stewart Tech on






  • 4.  RE: Connecting SQL to Sage 100

    Posted 01-15-2025 15:12

    Outside of ODBC Security, that should be about it.  Can you restart the SQL Server express service or try creating a new Linked Server?



    ------------------------------
    Steve Iwanowski, NextStep Technology Advisors, aka DSD Lancaster PA ¯\_(ツ)_/¯
    ------------------------------



  • 5.  RE: Connecting SQL to Sage 100

    Posted 01-15-2025 15:16
    Yeah - I've tried all of that and I've rebooted the server a few times. 

    Note - this is on Sage 2024 so is there something I'm missing? I've never had this problem before and unfortunately, I'm not strong with SQL and the IT team/person who needs this isn't either so I'm on my own here with this. I'm wondering if there could be something wrong with the SQL rights? It's the only thing I can think of right now.


    Tara Schinkel, CPA,   Accounting Systems Lead & CFO

     

    Stewart Technologies, Inc.

    Champions for your efficiency.

    main: 410.309.9550 x 1104   

    stewarttechnologies.com   |   Follow Stewart Tech on






  • 6.  RE: Connecting SQL to Sage 100

    Posted 01-15-2025 15:29

    If you have Excel installed, can you connect to Sage via your System DSN and see the tables?  That might be one way to see if the issue is with SQL or the ODBC/DSN



    ------------------------------
    Javier Guzman
    Consultant
    ProSolutions
    ------------------------------



  • 7.  RE: Connecting SQL to Sage 100

    Posted 01-15-2025 15:31
    I got it working! 

    SQL express was running under a different account than what I had setup for Sage (not I did not install SQL). As soon as I changed it to log in under my windows account, it all started working. YES!


    Tara Schinkel, CPA,   Accounting Systems Lead & CFO

     

    Stewart Technologies, Inc.

    Champions for your efficiency.

    main: 410.309.9550 x 1104   

    stewarttechnologies.com   |   Follow Stewart Tech on






  • 8.  RE: Connecting SQL to Sage 100

    Posted 01-15-2025 16:57

    Good news!

    Here are my notes for setting up a linked server, for future reference:

    Configure a Silent DSN

    As usual…but , if using 64-bit SQL, with 64-bit ODBC driver v4.4.4 (the version that comes with Sage 2014) or above.

    Configure SQL Server options

    From MS SQL Server Management Studio

    Scroll to Server Objects => Linked Servers => Providers

    Right Click MSDASQL => Properties

    The only options selected should be "Allow in Process" & "Level zero only"

    Select the above options and click OK

    From The SQL Server "New Query"

    sp_configure 'show advanced options', 1;

    RECONFIGURE;

    GO

    sp_configure 'Ad Hoc Distributed Queries', 1;

    RECONFIGURE;

    GO

    Execute the query

    Create the linked server in SQL Management Studio

    Linked Servers Right Click => New Linked Server

    Linked Server Name = DSN NAME

    Server Type = Other Data Source

    Provider = Microsoft OLE DB Provider for ODBC Drivers

    Product name = DSN NAME

    Data source = DSN NAME

    Define a Connection String(Provider String)

    Driver={MAS 90 4.0 ODBC Driver}; UID=userid; PWD=password; Company=ABC; Directory=\\UNC to ….\MAS90; LogFile=C:\PVXODBC.LOG; CacheSize=4; DirtyReads=1; BurstMode=1; StripTrailingSpaces=1; SILENT=1; SERVER=NotTheServer

    *Notes

    SILENT=1; Since SQL Server is running as a Service, any errors that force a dialog will not display and cause the process to continue running.

    Change the SQL Service to run under a domain login (so it can access the UNC).  (Always use SQL Configuration Manager for the SQL service change, not Windows Services).

    I read on SageCity that the DirtyReads / BurstMode references need to be removed, but I'm not sure that is necessary.

    Test the connection

    SELECT * FROM OPENQUERY (DSN_Name, 'Select * from GL_Account')



    ------------------------------
    Kevin Moyes
    Technical Systems Analyst
    Munjal White Consulting Co.
    Toronto ON
    ------------------------------



  • 9.  RE: Connecting SQL to Sage 100

    Posted 01-15-2025 17:23
    Thanks for sharing this and based on what I learned today, the big catch is always check the service SQL is running under if the tables aren't loading. That was what cost me today. So annoyed I didn't think to check that sooner.


    Tara Schinkel, CPA,   Accounting Systems Lead & CFO

     

    Stewart Technologies, Inc.

    Champions for your efficiency.

    main: 410.309.9550 x 1104   

    stewarttechnologies.com   |   Follow Stewart Tech on