Skip to Content
avatar image
Former Member

Getting error in Connection with SAP 2007 with SQL 2005

Hi

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

  • Get RSS Feed

1 Answer

  • Aug 20, 2007 at 10:02 PM

    Hi,

    Please could you post the code you are using?

    Kind Regards,

    Owen

    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

      Himanshu