Does ACCPAC.Advantage depend on Windows.Forms?

Trying to use the .NET ACCPAC.Advantage library in a console app and it's saying I need a ref to windows.forms DLL? Is this normal? Do I really need win forms?

Parents Reply Children
  • 0 in reply to JStrz

    Well, I just happen to have two C# DotNet projects open that I've been working on. 

    The first project runs from a form, so Windows.Forms is there:

    But on the 2nd, a console project, there's no Forms reference:

    Here is how I start it in #2:

    static bool OpenSession()
    {
    try
    {
    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);

    return true;
    }
    catch (Exception e)
    {
    // Console.WriteLine("Error in function OpenSession");
    iErrorCount++;
    Console.WriteLine(e.ToString());
    return false;
    }
    }

  • 0 in reply to Jay Converse Acumen

    You're only using the COMAPI though right? I'm using the ACCPAC.Advantage.dll 

  • 0 in reply to JStrz

    Yeah, the COMAPI fulfills all my programming needs.