DBC_GetProperty Procedure
This function return property value.
=
DBC_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 function succeeds, the return value is _DBC_ObjectFound.

If the function fails, the return value is _DBC_ObjectNotFound.
Example
#INCLUDE "dbc.h"
SET PROCEDURE TO dfo.prg ADDITIVE
LOCAL lcAlias,liIDT,lcDBC,luValue
lcAlias=SYS(2015)
lcDBC=HOME(2)+"\Tastrade\Data\tastrade.dbc"
USE (lcDBC) ALIAS (lcAlias) IN 0
* Get field ID
liIDT=DBC_GetIDObject(lcAlias,_DBC_Field,"products.product_id")
* Get property value
=DBC_GetProperty(lcAlias,liIDT,_DBCID_Comment,@luValue)
?luValue
USE IN (lcAlias)
RELEASE PROCEDURE dfo.prg


See also
Expand/Collapse source code of procedure DBC_GetProperty Source Code
LPARAMETERS lcAlias,liIDObject,liIDProp,luValue
* lcAlias    - Alias of opended 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=DFO_C4ToI(SUBS(Property,liStart,4)) && Lenght
   * This is lenght of Property ID
   liLenID=IIF(DFO_C2ToI(SUBS(Property,liStart+4,2))>256,2,1)

   * Is't finding property
   IF IIF(liLenID=1,ASC(SUBS(Property,liStart+4+2,liLenID)),;
          DFO_C2ToI(SUBS(Property,liStart+4+2,liLenID)))=liIDProp
      luValue=DBC_ConvertPropertyToValue(liIDProp,;
              SUBS(Property,liStart+3+2+liLenID+1,liLen-(3+2+liLenID+1)) )
      RETURN _DBC_ObjectFound
   ENDIF
   liStart=liStart+liLen
ENDDO
luValue=DBC_GetDefaultValue(liIDProp)
RETURN _DBC_ObjectFound