ACCPAC Session .Init parameters

Questions:


1. Where can we found exactly information about ACCPAC.Advantage > .Init session parameters, their sources and properly case usages?


2. Do [.Init] session parameters affect anything (for example, when reading data)?
* eg invalid [programName] can raise error


3. Should we use [appID] = ["UP"] (except XZ/XY) when want read data from ["UP0014"] and set [appVersion] from [CSAPP] table?
* where [appID] is Sage module prefix and [appVersion] is version from [CSAPP] (indiv. for each module)
* but again for get data from [CSAPP] we need init session before


4. Why [programName] should be "XY1000" or "XZ1000"? Any information about this.

The problem description:

For integration with Sage 300 ERP we are using ACCPAC.Advantage SDK.
Before [.Open] session,[.OpenDBLink], [.OpenView], and read data from Sage 300 view/table (eg UP0014 - Employees) like [.GoNext()]
we need to init session to Sage 300 ERP and set specific parameters.

Init session looks like: session.Init("", "XY", "XY1000", "61A") => ("objectHandler", "appID", "programName", "appVersion");

Unfortunately we did not find any exactly information about those init session parameters, their sources and properly case usages.
We know that in the [CSAPP] table and/or dbLink.ActiveApplications exists similar data (AH 72A; AS 64A; ...; UP 73A; UT 73B)
But this is that's all our knowledge about this.

The Sage Accpac .NET Class Library Helper not help us and talk about XZ and XZ1000 by default.
But other source tell about "XY", "XY1000" by defult.

Code usage example:

ACCPAC.Advantage.Session session = new ACCPAC.Advantage.Session();
session.Init("", "XY", "XY1000", "61A");
session.Open("login", "password", "company", DateTime.Now, 0);
ACCPAC.Advantage.DBLink dbLink = session.OpenDBLink(ACCPAC.Advantage.DBLinkType.Company, ACCPAC.Advantage.DBLinkFlags.ReadOnly);
ACCPAC.Advantage.View view view = dbLink.OpenView("UP0014");
while (view.GoNext())
{
    string val = view.Fields.FieldByName("FIRSTNAME").Value.ToString();
 ...
}

Thank you

Parents
  • 0

    Use the COMAPI library, not the Advantage.Session library:

    static AccpacSession session; 

    static AccpacDBLink a4wLink;

    static AccpacDBLink a4wLinkRead;

    session = new AccpacSession();

    session.Init("", "XY", "XY1000", "62A");

    session.Open(ACCPACUSER, ACCPACPW, Properties.Settings.Default.AccpacCompany, DateTime.Today, 0, "");

    a4wLink = session.OpenDBLink(tagDBLinkTypeEnum.DBLINK_COMPANY, tagDBLinkFlagsEnum.DBLINK_FLG_READWRITE);

    a4wLinkRead = session.OpenDBLink(tagDBLinkTypeEnum.DBLINK_COMPANY, tagDBLinkFlagsEnum.DBLINK_FLG_READONLY);

  • 0 in reply to Jay Converse Acumen

    Thank you for quick reply.

    1. For what reasons do you recommend COMAPI library instead of .NET? (advantages)
    As we know COM (COMAPI ) SDK more obsolete version than .NET (Accpac.Advantage).. (if we not wrong).
    In any case, steps in your sample are the same as ours: Init, Open, Open DBLink, etc

    2. From your sample: session.Init("", "XY", "XY1000", "62A");
    This is the same question case as for us above.
    Why do you use "XY", "XY1000", "62A" and not other parameters?
    Do you change those parameters in some cases?
    Could you provide documentation about this.
    Please re-read my questions above.

    3. We are know source destination of ACCPAC.Advantage SDK, but not about COMAPI source.
    Could you let me know where can i found COMAPI SDK DDLs?

    Thank you

  • 0 in reply to SageWalker

    1. Because I've been using it for 17 years and have never needed the other one.

    2. Because that's what works

    3. ..\RUNTIME\a4wcomex.dll

  • 0 in reply to Jay Converse Acumen

    Nevertheless, choice of SDK (COM/A4wcomex, .NET, Java, SData, etc) is secondary part and mostly related to platform. However, we  need to be sure (to prevent probaly issues in the future) in instructions which we use. About .Init ("objectHandler", "appID", "programName", "appVersion") - there is not exact info

    As we know it is somehow connected with: "Who is session module caller?"

    Example (assuming based on common knowledges about this):

    XY/XZ - this is unknown module caller and no matter version or other params

    UP, AR, ... - this is standard modules which are should be registered in the CSAPP table and appVersion should be equal to version from table.

    Custom Sage Module - similar as for UP, AR case and only for this is goal to change parameters in .Init

    Do you know smth about this?

    Please advice

    Thank you

Reply
  • 0 in reply to Jay Converse Acumen

    Nevertheless, choice of SDK (COM/A4wcomex, .NET, Java, SData, etc) is secondary part and mostly related to platform. However, we  need to be sure (to prevent probaly issues in the future) in instructions which we use. About .Init ("objectHandler", "appID", "programName", "appVersion") - there is not exact info

    As we know it is somehow connected with: "Who is session module caller?"

    Example (assuming based on common knowledges about this):

    XY/XZ - this is unknown module caller and no matter version or other params

    UP, AR, ... - this is standard modules which are should be registered in the CSAPP table and appVersion should be equal to version from table.

    Custom Sage Module - similar as for UP, AR case and only for this is goal to change parameters in .Init

    Do you know smth about this?

    Please advice

    Thank you

Children
No Data