cancel
Showing results for 
Search instead for 
Did you mean: 

Error: Ref count for this object is higher then 0

Former Member
0 Kudos
324

Hi, I have the following code to add a new table, when I run it I get the error -1120 Ref count for this object is higher then 0.

public void CrearTabla(SAPbobsCOM.Company oCompany, String name, String des) {

            SAPbobsCOM.UserTablesMD oUTables;

            oUTables = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables);

            oUTables.TableName = name;

            oUTables.TableDescription = des;

            int iRet = oUTables.Add();

            String error = oCompany.GetLastErrorDescription();

            System.Runtime.InteropServices.Marshal.ReleaseComObject(oUTables);

            oUTables = null;

            GC.Collect();

}

Someone who knows how to fix it

Thanks

View Entire Topic
paul_feeney
Employee
Employee
0 Kudos

Hello Maria,

This is a know issue. Please see SAP Note 723420 for more details and possible workarounds.

Kind regards,

Paul Feeney

SAP Business One Global Support