Jump to content

Laurence Maasdorp

Members
  • Posts

    2
  • Joined

  • Last visited

Reputation

0 Neutral
  1. Hi guys Sorry if I'm asking about an issue that has already been discussed. I'm using the AccpacSession to create a session in order to write an ArCashBook batch. Here is the code I'm using: session = new AccpacSession(); session.Init(model.ObjectHandle, model.AppID, model.ProgramName, model.AppVersion); session.Open(model.UserIdentifier, model.Password, model.Database, model.SessionDateTime, model.Flags, model.Reserved); dbLink = session.OpenDBLink(tagDBLinkTypeEnum.DBLINK_COMPANY, tagDBLinkFlagsEnum.DBLINK_FLG_READWRITE); Console.WriteLine("Session and db link created."); The code is failing on the 2nd line with this error: System.Runtime.InteropServices.COMException (0x80004005): Session could not be opened. at AccpacCOMAPI.IAccpacSession.Open(String UserIdentifier, String Password, String DataBase, DateTime SessionDate, Int32 Flags, String Reserved) Can anybody provide some input? Maybe It might be an environment issue? Any help would be appreciated.
×
×
  • Create New...