Hi,
When I connect my company object using :
SAPbouiCOM.SboGuiApi oUI = new SAPbouiCOM.SboGuiApi(); oUI.Connect(B1WizardBase.B1Connections.connStr); SAPbouiCOM.Application oAPP = oUI.GetApplication(); SAPbobsCOM.Company oC = oAPP.Company.GetDICompany() as SAPbobsCOM.Company;
I will get the above error.
But when I connect using below :
SAPbobsCOM.Company oC = new SAPbobsCOM.Company(); oC.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2012; oC.Server = "ServerName"; oC.LicenseServer = "ServerName:30000"; oC.CompanyDB = "SBODemo"; oC.UserName = "manager"; oC.Password = "password"; oC.Connect();
The codes go through without problem.
Seems like a bug. Will try to make a support call to SAP and see what they say.
Regards
Edy