Skip to Content
0
Former Member
May 05, 2005 at 06:35 AM

Connection to SBO-COMMON has failed

23 Views

Hi!

The following peice of code is working fine in VB 6.0 and VB .NET but it shows "Connection to SBO-COMMON has failed" in ASP .NET:

Public Sub SetCompany()

vCmp = New SAPbobsCOM.Company()

vCmp.Server = "(local)"

vCmp.language = SAPbobsCOM.BoSuppLangs.ln_English

vCmp.UseTrusted = False

End Sub

Public Sub SetServer()

SetCompany()

If cmdCompany.SelectedItem.Value = "TRCNewCo" Then

vCmp.CompanyDB = "TRCNewCo"

vCmp.UserName = "manager"

vCmp.Password = "manager"

ElseIf cmdCompany.SelectedItem.Value = "OEC Computers" Then

vCmp.CompanyDB = "SBODemo_US"

vCmp.UserName = "manager"

vCmp.Password = "manager"

End If

lRetCode = vCmp.Connect

If lRetCode <> 0 Then

vCmp.GetLastError(lErrCode, sErrMsg)

Response.Write(sErrMsg)

Else

Response.Write("Connected to " & vCmp.CompanyName)

End If

End Sub

Kindlu provide me the soultion of this problem

Regards,

Anuj