Skip to Content
Former Member
Aug 16, 2005 at 05:08 AM

Error while adding user fields to user table using vb6.0



I am adding a user tables using vb6.0 using DIAPI.

I am able to add the user table successfully.

I am getting the following error when i am adding the fields to the table.

"The metadata object for this object cannot be updated, since it's ref count is bigger than 0."

My code is as follows:

oUserFieldsMD.TableName = TABLE_NAME_ITEM_LOCN

oUserFieldsMD.Name = vTableFields(0, lCount)

oUserFieldsMD.Description = vTableFields(1, lCount)

oUserFieldsMD.Type = vTableFields(2, lCount)

oUserFieldsMD.EditSize = CLng(vTableFields(3,lCount))

lRetCode = oUserFieldsMD.Add

This error does not come up when i try to add the field to my table using the vb sample provided by SAP.

Your help will me much appreciated.