Skip to Content

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Oct 27, 2017 at 03:00 PM

    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
    
    Add comment
    10|10000 characters needed characters exceeded