cancel
Showing results for 
Search instead for 
Did you mean: 

Failed To Connect To SBOCommon

Former Member
0 Kudos

I am attempting to connect to SAB B1 2007 company using the following code:

SAPbobsCOM.Company.Server = "SAPServerName"

SAPbobsCOM.Company.CompanyDB = "SAPCompanyDB"

SAPbobsCOM.Company.UserName = "SAPUserName"

SAPbobsCOM.Company.Password = "SAPPassword"

SAPbobsCOM.Company.language = SAPbobsCOM.BoSuppLangs.ln_English;

SAPbobsCOM.Company.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2005;

int returnCode = sapCompany.Connect();

I am receiving the following error message:

-111 Falied to Connect to SBOCommon

Does anyone have any ideas why this is? I have ensured the License Manager is running.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

use below code dear,

1) Public oCompany As SAPbobsCOM.Company ' The company object

oCompany = New SAPbobsCOM.Company

' Set connection properties

oCompany.CompanyDB = cmbCompany.Text

oCompany.UserName = txtUSer.Text

oCompany.Password = txtPassword.Text

oCompany.DbPassword = txtsqlpass.Text

oCompany.DbUserName = txtsqluN.Text

oCompany.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2005

oCompany.Server = txtServer.Text

'Try to connect

lRetCode = oCompany.Connect()

2) remove %temp% file from server.

Thanks

Rajkumar Gupta

Former Member
0 Kudos

You either need to set oCompany.UseTrusted = True (and make sure your windows user has permissions)

or enter the oCompany.DbUser and oCompany.DbPassword values.

your code is trying to connect to the SBO-COMMON and can't as it is not able to log in to the SQL server.

Former Member
0 Kudos

Thank you for your quick reply! I tried assigning the DbUserName/DbPassword but now I see the following error:

Failed to Extract OBServer.dll from CAB File

Any ideas?

Former Member
0 Kudos

Its a common issue, usually resolved by going to Start->Run->%temp% - delete SM_OBS_DLL folder or reinstall DI API