Skip to Content
Former Member
May 05, 2006 at 04:30 PM

Need help: Connection to SBO-Common has failed


Hi to all,

I'm having problems to connect to the database server trough webservices.

I'm using: Windows XP, IIS 5.1, .NET 1.1 and VS2003

and: SBO2004A with DI API

When I invoke the webservice Connect() I get the following message: Connection to SBO-Common has failed.

This is my code:

Public Class Service1

    Inherits System.Web.Services.WebService

    Dim sErrMsg As String
    Dim lErrCode As Integer
    Dim result As String
    Public oCompany As SAPbobsCOM.Company

    <WebMethod()> _
    Public Function Connect() As String

        result = ConnectToCompany()
        Return result

    End Function

    Private Function ConnectToCompany()

        oCompany = New SAPbobsCOM.Company

        oCompany.Server = "(local)"
        oCompany.CompanyDB = "SBODemo_US"
        oCompany.UserName = "manager"
        oCompany.Password = "manager"
        oCompany.language = SAPbobsCOM.BoSuppLangs.ln_English

        oCompany.UseTrusted = True


        '// Check for errors during connect
        oCompany.GetLastError(lErrCode, sErrMsg)
        If lErrCode <> 0 Then
            Return sErrMsg
            Return "Success"
        End If

    End Function

End Class

Tkx in advance.