Hi Beni,
This is code before calling connect() :
SAPbouiCOM.SboGuiApi SboGuiApi = null;
string sConnectionString = null;
long retour;
string sCook;
string conStr;
SboGuiApi = new SAPbouiCOM.SboGuiApi();
// by following the steped specified above the following
// statment should be suficient for either development or run mode
//SboGuiApi.AddonIdentifier = "5645523035446576656C6F706D656E743A4E3036323136303439343550F780D9E1AA20456293BA6DBC6CE031FF774237";
sConnectionString = Interaction.Command();
// connect to a running SBO Application
SboGuiApi.Connect(sConnectionString);
// get an initialized application object
SBO_Application = SboGuiApi.GetApplication(-1);
SBO_Company = new SAPbobsCOM.Company();
sCook = SBO_Company.GetContextCookie();
conStr = SBO_Application.Company.GetConnectionContext(sCook);
retour = SBO_Company.SetSboLoginContext(conStr);
if (retour != 0) SBO_Application.MessageBox("Problème de connexion ! ( Error : SetSboLoginContext())", 0, null, null, null);
else retour = SBO_Company.Connect();
if (retour != 0)
Thanks.
Best regards,
Michael