Experts,
I am tasked with troubleshooting some custom development at a customer's site, and am running into the following error when running an automated process.
Unable to cast COM object of type 'System.__ComObject' to interface type 'SAPbobsCOM.Recordset'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{8CA3AB92-1930-4511-4AA8-82D53C3150C3}' failed due to the following error: Old format or invalid type library. (Exception from HRESULT: 0x80028019 (TYPE_E_UNSUPFORMAT)).
The reference that follows points to this line of code.
Recordset rs = null;
if (rs != null)
{
System.Runtime.InteropServices.Marshal.ReleaseComObject(rs);
rs = null;
GC.WaitForPendingFinalizers();
GC.Collect();
}
rs = (Recordset)Company.GetBusinessObject(BoObjectTypes.BoRecordset); This is the line that fails.
rs.DoQuery(pQuery);
return rs;
Any suggestions would be greatly appreciated.
kindest regards,
Lucas