DBC_EnumProperty Procedure
This function return list of object properties.
=
DBC_EnumProperty
Parameter
lcAlias
DBC Alias
Type Character
Direction Input
Alias of opened DBC as table.
liIDObject
Object ID
Type Integer
Direction Input
See DBC_GetIDObject().
laProp
List of object properties
Type Array
By reference  
Direction Output
Output array is two dimensional. For each property is one row in array. First column is property id and second column is property value.
Note
For converting property ID to property name use function DBC_FormatProperty().
Return value Integer
If the function succeeds, the return value is count of selected objects.

If the function fails, the return value is _DBC_ObjectNotFound.
Example
#INCLUDE "dbc.h"
SET PROCEDURE TO dfo.prg ADDITIVE
LOCAL lcAlias,liIDT,liCount,lii,lcDBC
LOCAL ARRAY laProps(1)
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 list
liCount=DBC_EnumProperty(lcAlias,liIDT,@laProps)
FOR lii=1 TO liCount
    ?laProps(lii,1),DBC_FormatProperty(laProps(lii,1)),laProps(lii,2)
NEXT
USE IN (lcAlias)
RELEASE PROCEDURE dfo.prg


See also
Expand/Collapse source code of procedure DBC_EnumProperty Source Code
LPARAMETERS lcAlias,liIDObject,laProp
* lcAlias    - Alia sof opended DBC
* liIDObject - Object ID
* @laProp    - Output array for Properties and their values


EXTERNAL ARRAY laProp

LOCAL liStart,liLen,liLenID,lii
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
lii=0 && Reset counter
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)

   lii=lii+1 && Increment counter
   DIME laProp(lii,3)
   * Property ID
   laProp(lii,1)=IIF(liLenID=1,ASC(SUBS(Property,liStart+4+2,liLenID)),;
                 DFO_C2ToI(SUBS(Property,liStart+4+2,liLenID)))
   * Convert DBC value to Value
   laProp(lii,2)=DBC_ConvertPropertyToValue(laProp(lii,1),;
                 SUBS(Property,liStart+3+2+liLenID+1,liLen-(3+2+liLenID+1)))
   liStart=liStart+liLen
ENDDO
RETURN lii