ClearProperty Method
Class: _DBC
This method remove property.
=
Object.ClearProperty
Parameter
lcAlias
DBC Alias
Type Character
Direction Input
Alias of opened DBC as table.
liIDObject
Object ID
Type Integer
Direction Input
See _DBC::GetIDObject().
liIDProp
Property ID
Type Integer
Direction Input
Property ID. For a list of properties, see _DBC::EnumProperty().
Return value Integer
If the method succeeds, the return value is _DBC_ObjectFound .

If the method fails, the return value is _DBC_ObjectNotFound .
Example
#INCLUDE "dbc.h"
SET PROCEDURE TO dbc.prg ADDITIVE
LOCAL lcAlias,liIDT,loDBC,luValue,luValueO
loDBC=CREATEOBJECT("_DBC")
lcAlias=SYS(2015)
=loDBC.OpenTable(HOME(2)+"\Tastrade\Data\tastrade.dbc",lcAlias,"")
* Get field ID
liIDT=loDBC.GetIDObject(lcAlias,_DBC_Field,"products.product_id")
* Get property value
=loDBC.GetProperty(lcAlias,liIDT,_DBCID_Comment,@luValueO)
?luValueO

* Clear property value
=loDBC.ClearProperty(lcAlias,liIDT,_DBCID_Comment)
=loDBC.GetProperty(lcAlias,liIDT,_DBCID_Comment,@luValue)
?luValue

* Set property old value
=loDBC.SetProperty(lcAlias,liIDT,_DBCID_Comment,@luValueO)
* Get property value
=loDBC.GetProperty(lcAlias,liIDT,_DBCID_Comment,@luValue)
?luValue

loDBC.CloseTable(lcAlias)
RELEASE loDBC
RELEASE PROCEDURE dbc.prg


See also
Expand/Collapse source code of procedure ClearProperty Source Code
      LPARAMETERS lcAlias,liIDObject,liIDProp
      * lcAlias    - Alias of opened DBC
      * liIDObject - Object ID
      * liIDProp   - Property ID


      LOCAL liStart,liLen,liLenID
      liStart=1 && First char

      SELE (lcAlias) && Skip to DBC 
      LOCATE FOR ObjectID=liIDObject && Find object
      IF !FOUND() && If not found
         RETURN _DBC_ObjectNotFound && Get out
      ENDIF

      DO WHILE liStart<=LEN(Property)
         liLen=This.C4ToI(SUBS(Property,liStart,4)) && Lenght
         * This is lenght of Property ID
         liLenID=This.C2ToI(SUBS(Property,liStart+4,2))

         * Is't finding property
         IF This.CnToI(SUBS(Property,liStart+4+2,liLenID))=liIDProp
            REPL Property WITH STUFF(Property,liStart,liLen,"")
            EXIT
         ENDIF
         liStart=liStart+liLen
      ENDDO

      RETURN _DBC_ObjectFound