CheckProperties Method
Class: _DBC
This method return list of object properties and they check status.
=
Object.CheckProperties
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, second column is property value, third is native property value and fourth is check status. List of check status values
ValueDescription
_DBC_Check_OKNo problema
_DBC_Check_PropertyType_UnknownProperty ID is unknown
_DBC_Check_PropertyValue_InvalidProperty value is invalid

Note
For converting property ID to property name use function _DBC::FormatProperty().
Return value Integer
If the method succeeds, the return value is count of selected objects.

If the method fails, the return value is _DBC_ObjectNotFound .
Example
#INCLUDE "dbc.h"
SET PROCEDURE TO dbc.prg ADDITIVE
LOCAL lcAlias,liIDT,liCount,lii,loDBC
LOCAL ARRAY laProps(1)
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 list
liCount=loDBC.CheckProperties(lcAlias,liIDT,@laProps)
FOR lii=1 TO liCount
    ?laProps(lii,1),loDBC.FormatProperty(laProps(lii,1)),laProps(lii,2),laProps(lii,3),laProps(lii,4)
NEXT
loDBC.CloseTable(lcAlias)
RELEASE loDBC
RELEASE PROCEDURE dbc.prg


See also
Expand/Collapse source code of procedure CheckProperties Source Code
      LPARAMETERS lcAlias,liIDObject,laProp
      * lcAlias    - Alias of opened DBC
      * liIDObject - Object ID
      * @laProp    - Output array for Properties, their values and results


      LOCAL liStart,liLen,liLenID,lii,liID,liType
      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=This.C4ToI(SUBS(Property,liStart,4)) && Lenght
         * This is lenght of Property ID
         liLenID=This.C2ToI(SUBS(Property,liStart+4,2))

         lii=lii+1
         DIMENSION laProp(lii,4)
         * Property ID
         laProp(lii,1)=This.CnToI(SUBS(Property,liStart+4+2,liLenID))

         * Native Value
         laProp(lii,3)=SUBS(Property,liStart+3+2+liLenID+1,liLen-(3+2+liLenID+1))

         * Check ID property
         liType=This.GetValueType(laProp(lii,1))
         IF liType=_DBC_ValueType_Unknown
            laProp(lii,4)=_DBC_Check_PropertyType_Unknown
         ELSE
            * Check if native value have right format
            IF IIF(liType=_DBC_ValueType_String, RIGHT(laProp(lii,3),1)#CHR(0),;
               IIF(liType=_DBC_ValueType_Byte, LEN(laProp(lii,3))#1,;
               IIF(liType=_DBC_ValueType_SI32R,LEN(laProp(lii,3))#4,;
               IIF(liType=_DBC_ValueType_I32R, LEN(laProp(lii,3))#4,;
               IIF(liType=_DBC_ValueType_Boolean, ;
                   LEN(laProp(lii,3))#1 OR !INLIST(ASC(laProp(lii,3)),0,1),;
               IIF(!ISNULL(This.oConnector),This.oConnector.CheckProperties(laProp(lii,1),liType,laProp(lii,3)),;
               .T.))))))
               laProp(lii,4)=_DBC_Check_PropertyValue_Invalid
            ELSE
               * Convert DBC value to Value
               laProp(lii,2)=This.DBCValueToValue(laProp(lii,1),laProp(lii,3))
               laProp(lii,4)=_DBC_Check_OK
            ENDIF
         ENDIF
         liStart=liStart+liLen
      ENDDO
      RETURN lii