Hi,
Im currently developing some Add-ons for our company and just had a question about the connection to the database.
Im currently using the following method to open a connection to the SAP database.
oCompany = new SAPbobsCOM.Company(); oCompany = (SAPbobsCOM.Company)Application.SBO_Application.Company.GetDICompany(); oCompany.Connect(); if (oCompany.Connected == true) { // Execute some code }
What I have found is it takes quite some time to open this connection. I see this is an issue quite a few people have. So I think I should open the connection only once, and keep it persistent whilst the add-on is running.
I have thought about placing it in the SBO_Application_FormDataEvent, but perhaps some one has a better solution?
Regards