Laurence Maasdorp Posted September 4 Share Posted September 4 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. Link to comment Share on other sites More sharing options...
Laurence Maasdorp Posted September 4 Author Share Posted September 4 BTW SAGE300 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now