Skip to Content
author's profile photo Former Member
Former Member

UserTablesMD/6.5/Delphi 8


I use UI and DI together. I have connetion to Company and following code:

oMBTable := oCmp.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables);

if oMBTable.GetByKey('Test') = false then begin

oMBTable.TableName := 'Test';

oMBTable.TableDescription := 'Test 1';

err := oMBTable.Add;


and I recive err = -1120 with message:

"The Mete Data for this object cannot be updated, sience it's ref count is bigger than 0".

Earlier I haven't any problems with this code?

What it's wrong?


Tomasz Tura

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Feb 21, 2005 at 10:09 AM


    I think this error is because there is some object of type SAPbobsCOM.BoObjectTypes.oUserTables in "memory".

    After you assign an object of type SAPbobsCOM.BoObjectTypes.oUserTables, you have to release this object, before you use again, or use objects SAPbobsCOM.BoObjectTypes.oUserFields.

    Try create and use this object in a procedure, declare like a local var, and at the finish of the procedure release (or freeandnil) this object.


    Ribeiro Santos

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks Roberio,

      I found the problem. Before I create UserTable - I use RecordSet object (in another function) and in this point is problem. Before create UserTableMB I cann't use any another DI objects.

      Thank for your answer!

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.