Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accpac Linkage with .Net

Status
Not open for further replies.

RajenderMakhija

Programmer
Aug 21, 2007
2
IN
I have taken below mention code from this site which was posted by Jay. I want to know which accpac dll file will be added as references C# project and how to link this code to particular company.

public void SignOnCompany2()
{
AccpacCOMAPI.AccpacSession pSession;
AccpacSignonManager.AccpacSignonMgr pSignon;
AccpacCOMAPI.AccpacDBLink pDBLinkCmpRW;
AccpacCOMAPI.AccpacDBLink pDBLinkSysRW;

pSession = new AccpacCOMAPI.AccpacSessionClass();
pSignon = new AccpacSignonManager.AccpacSignonMgrClass();

pSession.Init ("","CS","CS0001", "53A");
pSignon.SignonNewSession (pSession);

if (pSession.IsOpened)
{ pDBLinkCmpRW = pSession.OpenDBLink
(AccpacCOMAPI.tagDBLinkTypeEnum.DBLINK_COMPANY,
AccpacCOMAPI.tagDBLinkFlagsEnum.DBLINK_FLG_READWRITE);
pDBLinkSysRW = pSession.OpenDBLink
(AccpacCOMAPI.tagDBLinkTypeEnum.DBLINK_SYSTEM,
AccpacCOMAPI.tagDBLinkFlagsEnum.DBLINK_FLG_READWRITE);
}
}

 
You need to add AccpacAdvantage to your project.
You are not opening a session, after pSession.Init try
pSession.Open "ADMIN,"ADMIN","SAMINC",Date,0
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top