Skip to Content
author's profile photo
Former Member

Getting error in Connection with SAP 2007 with SQL 2005


I am getting the error while running the Sample code of "UsingSBObob"

Run-time error '-111

Connection to SBO-Common has failed

Please provide the solution

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Posted on Aug 20, 2007 at 10:02 PM


    Please could you post the code you are using?

    Kind Regards,


    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Owen

      You have to specify the SQL Server 2005 in the code so that you can connect with that. Below is the code

      Private Sub ConnectToCompany()

      '// Initialize the Company Object.

      '// Create a new company object

      Set oCompany = New SAPbobsCOM.Company

      '// Set the mandatory properties for the connection to the database.

      oCompany.Server = "CTX17\SQL2005" --- Specify the SQL2005 here

      oCompany.language = ln_English

      '// Use Windows authentication for database server.

      '// True for NT server authentication,

      '// False for database server authentication.

      oCompany.UseTrusted = True

      oCompany.DbServerType = dst_MSSQL2005 -

      New line to add in code

      ChooseCompany.Show vbModal, Me

      End Sub