cancel
Showing results for 
Search instead for 
Did you mean: 

Connection to SBO-COMMON has failed

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Anuj,

You're not using a trusted connection and also not passing the database user name and password.

Try setting vCmp.dbUser and vCmp.DbPass

Hope it helps,

Adele