Skip to Content
0

Is it possible to use SAP B1 DI API to connect to a remote SAP server?

Oct 27, 2017 at 01:59 PM

48

avatar image

If yes, how to configure the code to connect to a remote server? Thank you.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Danilo Kasparian Oct 27, 2017 at 03:00 PM
1

Yes, but probably it will be slow

Public vCompany As SAPbobsCOM.Company

.....

Set vCompany = New 
SAPbobsCOM.Company

'Initialize the Company Object for 
the Connect method
vCompany.Server = "REMOTE SERVER ADDRESS"
vCompany.CompanyDB = "DATABASE"
vCompany.UserName = "SAP USER"
vCompany.Password = "SAP PASSWORD"
vCompany.DbPassword = "SQL PASSWORD"
vCompany.DbUserName = "SQL USER"
vCompany.LicenseServer = "LICENSE SERVER" or vCompany.SLDServer (If SAP Version higher than 9.2 PL05)
vCompany.DbServerType = SQL VERSION


Dim nResult 
As Long
Dim strErrString As String

'Connect to the 
database
nResult = vCompany.Connect
Share
10 |10000 characters needed characters left characters exceeded