Sage .NET API Errors

SOLVED

In the Session.Init method, I'm getting an error that just shows 1.4197.5

I have no idea what this means and don't see documentation anywhere that explains it. Can anyone help on what this means?

Parents
  • +1
    verified answer

    Which version of Sage are you using? 62A is Sage 2014.

    The code to create a session using .NET is:

    DBLink mDBLinkCmpRW;
    Session accpacSession = new Session();
    accpacSession.Init("", "XY", "XY1000", "66A"); // 66 is 2019
    accpacSession.Open("ADMIN", "ADMIN", "SAMLTD", DAteTime.Now, 0);
    mDBLinkCmpRW = accpacSession.OpenDBLink(DBLinkType.Company, DBLinkFlags.ReadWrite);
    
    

  • 0 in reply to Vega

    Excellent, that worked. Wow, the error messages with this are almost useless haha. So, how did you know 66a is the right code? I'm having a very difficult time finding any good documentation on this

  • 0 in reply to JStrz

    There is no good documentation besides Google searches.

  • 0 in reply to JStrz

    If you are a dev partner there is more documentation, you can also try the Sage NA GitHub, https://github.com/SageNADev.  With the SDK there is documentation and samples.  It isn't the most comprehensive but...otherwise, like Jay said, Google searches is your friend.

  • 0 in reply to JStrz

    Sage release numbers are:

    2010: 60

    2012: 61

    2014: 62

    2016: 63

    2017: 64

    2018: 65

    2019: 66

    2020: 67

    2021: 68

    2022: 69

    I think the idea is that going forward Sage will be known by its release year but internally the version number is still used in places. For documentation, there is the github which gives you info about the web API. There is here and a couple of other forums Tek-Tips and PlusCommunity. You get the odd question on Stack Overflow and Experts-Exchange. There is no real documentation out there for developing with Sage 300. Usually someone shows you and you pick up from other code and by asking questions. Most of the time, to get an idea of how to do something, record a macro. That will give you the rough structure and from that you can convert to C# quite easily but there are online tools to help although I haven't used them. For COM API I found this. There is the DPP wiki but you will need to be a DPP Partner to access that. There is always Steve Smiths blog for lots of snippets. Other than that you might find the odd page here and there. These forums are the most active though.

Reply
  • 0 in reply to JStrz

    Sage release numbers are:

    2010: 60

    2012: 61

    2014: 62

    2016: 63

    2017: 64

    2018: 65

    2019: 66

    2020: 67

    2021: 68

    2022: 69

    I think the idea is that going forward Sage will be known by its release year but internally the version number is still used in places. For documentation, there is the github which gives you info about the web API. There is here and a couple of other forums Tek-Tips and PlusCommunity. You get the odd question on Stack Overflow and Experts-Exchange. There is no real documentation out there for developing with Sage 300. Usually someone shows you and you pick up from other code and by asking questions. Most of the time, to get an idea of how to do something, record a macro. That will give you the rough structure and from that you can convert to C# quite easily but there are online tools to help although I haven't used them. For COM API I found this. There is the DPP wiki but you will need to be a DPP Partner to access that. There is always Steve Smiths blog for lots of snippets. Other than that you might find the odd page here and there. These forums are the most active though.

Children
No Data