GetProperty Method
Class: _DBC
This method return property value.
=
Object.GetProperty
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().
luValue
Property value
By reference  
Direction Output
Pointer to a variable that receives the property value. If is not property saved, then luValue contain default value. If is property ID unknown, then luValue contain native value from DBC.
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
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,@luValue)
?luValue
loDBC.CloseTable(lcAlias)
RELEASE loDBC
RELEASE PROCEDURE dbc.prg


See also
Expand/Collapse source code of procedure GetProperty Source Code
      LPARAMETERS lcAlias,liIDObject,liIDProp,luValue
      * lcAlias    - Alias of opened DBC
      * liIDObject - Object ID
      * liIDProp   - Property ID
      * @luValue   - (output) Value of property


      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
            luValue=This.DBCValueToValue(liIDProp,;
                    SUBS(Property,liStart+4+2+liLenID,liLen-(4+2+liLenID)) )
            RETURN _DBC_ObjectFound
         ENDIF
         liStart=liStart+liLen
      ENDDO
      luValue=This.GetDefaultValue(liIDProp)
      RETURN _DBC_ObjectFound