on ‎2024 Jun 20 4:02 PM
Dears,
I am using vb.net to connect SAP Business One 10.00.170 via DI API using following code which works perfectly , but when i try to conect to 10.00.110 and facing following error while connecting to DB.
-132 Error during SBO user authentication
public SAPbobsCOM.Company fnGetCompany()
{
oCompany = new Company()
oCompany.Server = "10.10.50.101"
oCompany.DbServerType = BoDataServerTypes.dst_MSSQL2017
oCompany.CompanyDB = "TEST_COMPANY"
oCompany.UserName = "manager";
oCompany.Password = "****";
oCompany.DbUserName = "****";
oCompany.DbPassword = "*****";
oCompany.UseTrusted = true;
oCompany.language = BoSuppLangs.ln_English;
int result = oCompany.Connect();
if (result != 0)
{
MessageBox.Show( oCompany.GetLastErrorCode() + " " + oCompany.GetLastErrorDescription());
}
return oCompany;
}
What could be possible reasons ?
Request clarification before answering.
Here’s a precise checklist and a corrected connection snippet for SAP Business One 10.00.110 via DI API. Error -132 (Error during SBO user authentication) almost always boils down to one of the items below.
What to fix/check (in order)
Version/patch match (critical)
License Server must be set
Pick ONE DB authentication mode
Company user is SAP B1 user (not SQL)
Server/Instance and DB type
SBO-COMMON & Company DB state
Network/DNS basics
Corrected sample (C#)
using SAPbobsCOM;
public Company ConnectB1()
{
var oCompany = new Company
{
// SQL Server host (add instance if needed, e.g. "10.10.50.101\\SQL2017")
Server = "10.10.50.101",
DbServerType = BoDataServerTypes.dst_MSSQL2017,
// Company database
CompanyDB = "TEST_COMPANY",
// SAP Business One user credentials (NOT SQL)
UserName = "manager",
Password = "******",
// Use SQL authentication for DB (common)
UseTrusted = false,
DbUserName = "sql_user",
DbPassword = "sql_password",
// MUST point to the B1 License Server host:30000
LicenseServer = "B1-LIC-HOST:30000",
language = BoSuppLangs.ln_English
};
int rc = oCompany.Connect();
if (rc != 0)
{
oCompany.GetLastError(out int errCode, out string errMsg);
throw new ApplicationException($"DI API connect failed: {errCode} - {errMsg}");
}
return oCompany;
}
If you really need Windows (trusted) auth:
UseTrusted = true;
// Do NOT set DbUserName/DbPassword in this case.
// Ensure the Windows account running the process has SQL access to SBO-COMMON and the company DB.
Fast diagnostics for -132
Let me know if you need further support
with kind regards
Chuma
GenAI assist content(Reference Articles and Guides for helpful information and guidance)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 27 | |
| 20 | |
| 20 | |
| 7 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.