on 07-06-2015 5:34 PM
Hello
I need help to do Dynamic oCompany, actually im connect with the information of only one company with this code.
Public Sub ConnectCompany()
oCompany = New SAPbobsCOM.Company()
oCompany.Server = "SERVER_NAME"
oCompany.DbUserName = "USER_DB"
oCompany.DbPassword = "DB_PASSWORD"
oCompany.CompanyDB = "NAME_OF_DB"
oCompany.UserName = "USER"
oCompany.Password = "PASSWORD"
oCompany.LicenseServer = "localhost:30000"
oCompany.UseTrusted = False
oCompany.DbServerType = BoDataServerTypes.dst_MSSQL2012
oCompany.language = BoSuppLangs.ln_English
But i need connect to diferent company, for example my add-on have to run on different company
Hi,
If you need to connect to 2 company under the same server and the same version.
Public oCompany as SAPbobsCOM.Company
Public oCompany2 as SAPbobsCOM.Company
Public Sub ConnectCompany()
oCompany = New SAPbobsCOM.Company()
oCompany.Server = "SERVER_NAME"
oCompany.CompanyDB = "NAME_OF_DB"
oCompany.UserName = "USER"
oCompany.Password = "PASSWORD"
oCompany.LicenseServer = "localhost:30000"
oCompany.DbServerType = BoDataServerTypes.dst_MSSQL2012
oCompany.Connect
oCompany2 = New SAPbobsCOM.Company()
oCompany2.Server = "SERVER_NAME"
oCompany2.CompanyDB = "NAME_OF_DB2"
oCompany2.UserName = "USER2"
oCompany2.Password = "PASSWORD2"
oCompany2.LicenseServer = "localhost:30000"
oCompany2.DbServerType = BoDataServerTypes.dst_MSSQL2012
oCompany2.Connect
Regards
Edy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jesus,
There was a similar question last weekend about this, please see: http://scn.sap.com/thread/3763144
Issue is not to have the addon to connect (simultaneously or separately) on various servers, issue is that they have to be of the same DI version.
From your sample (too much data provided), you can make parameters from everything and to read them from a configuration file.
Regards,
Eric
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.