on 01-18-2011 3:10 PM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.