on 08-16-2005 6:08 AM
Hi,
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.
Thanks.
Hi Satish,
The problem is that you added the table and the objetc that you used to add the table is not freed properly. You need to free the object and then the reference count to that table will be 0 - which will enable you to add the fields
...
e.g
Dim pUTables As SAPbobsCOM.UserTablesMD
'Do your stuff
Set pUTables = Nothing
Dim pUFields As SAPbobsCOM.UserFieldsMD
'Do your stuff
Set pUFields = Nothing
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.