GetDefaultValue Method
Class: _DBC_Connector
This method return default value.
Note
This method is called automaticaly from _DBC::GetDefaultValue() if _DBC::oConnector object defined.
=
Object.GetDefaultValue
Parameter
liIDProp
Property ID
Type Integer
Direction Input
Property ID. For a list of properties, see _DBC::EnumProperty().
Return value Integer/String/Boolean
If the method succeeds, the return value is default value.

If the method fails, the return value must be .NULL. .
Example
#INCLUDE "dbc.h"
#DEFINE MyProperty 1000 && user cutom property (string)
SET PROCEDURE TO dbc.prg ADDITIVE
LOCAL lcAlias,liIDT,loDBC,luValue
LOCAL ARRAY laProps(1)
loDBC=CREATEOBJECT("_DBC")
lcAlias=SYS(2015)
=loDBC.OpenTable(HOME(2)+"\Tastrade\Data\tastrade.dbc",lcAlias,"")

liIDT=loDBC.GetIDObject(lcAlias,_DBC_Table,"products")
* How to use connector for own properties
loDBC.oConnector=CREATEOBJECT("_my_Connector")
* Set New property
=loDBC.SetProperty(lcAlias,liIDT,MyProperty,"Wow, I can write own property")
=loDBC.GetProperty(lcAlias,liIDT,MyProperty,@luValue)
?loDBC.FormatProperty(MyProperty),luValue,loDBC.GetDefaultValue(MyProperty)

=loDBC.CloseTable(lcAlias)
loDBC.CloseTable(lcAlias)

RELEASE loDBC
RELEASE PROCEDURE dbc.prg


DEFINE CLASS _my_Connector AS _DBC_Connector

   PROCEDURE FormatProperty(liIDProp) && Convert property ID to Name
      * liIDProp   - Property ID
      RETURN IIF(liIDProp=MyProperty,"My New Property","") && default return value
   ENDPROC

   PROCEDURE GetDefaultValue(liIDProp) && Get default Value
      * liIDProp   - Property ID
      RETURN IIF(liIDProp=MyProperty,"",.NULL.) && default return value
   ENDPROC

   PROCEDURE GetValueType(liIDProp) && Return the property type
      * liIDProp - Property ID
      RETURN IIF(liIDProp=MyProperty,;
             _DBC_ValueType_String,;
             _DBC_ValueType_Unknown) && default return value
   ENDPROC
ENDDEFINE


See also
Expand/Collapse source code of procedure GetDefaultValue Source Code
      LPARAMETERS liIDProp
      * liIDProp   - Property ID


      RETURN .NULL. && default return value