Hi all, I'm trying to diagnose a SAP Business One DI API connection error and would appreciate any insights.
Setup
- SAP B1: Version 9.x
- Application: .NET Windows Service
- DI API: Late-bound COM via
Type.GetTypeFromProgID("SAPbobsCOM.Company")
- Threading: STA
- Process: 64-bit
I'm setting the following properties before calling Connect():
Server (IP)
CompanyDB
UserName
Password
DbServerType
LicenseServer (Usually defaults to same with server)
UseTrusted = false
Problem
- The ProgID resolves successfully, and the COM object is created.
Company.Connect() returns -226.
GetLastErrorDescription() returns: The specified resource name cannot be found in the image file.
- Subsequent calls throw a
COMException (0xFFFFFF96) with the message: You are not connected to a company
I had once achieved a connection against another database, can't seem to point out what the outstanding issue now is.
Any pointers to the specific cause or recommended troubleshooting steps would be appreciated. Thanks!