Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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

        oCompany.Connect()

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

    End Function


End Class

Tkx in advance.

Vítor

Tags:
Not what you were looking for? View more on this topic or Ask a question