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?
I opened up the ACCPAC.Advantage.dll and it does have a reference to Windows.Forms
That seems odd. I wonder if anyone else has used the .net API with C# and had this issue?
I opened up the ACCPAC.Advantage.dll and it does have a reference to Windows.Forms
That seems odd. I wonder if anyone else has used the .net API with C# and had this issue?
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;
}
}
You're only using the COMAPI though right? I'm using the ACCPAC.Advantage.dll
Yeah, the COMAPI fulfills all my programming needs.
*Community Hub is the new name for Sage City