Description

A data string or BLOB associated with this McDBNode.

Property type

A Variant value.  

Syntax

object.Data([Format]) [= value]

The Data Property syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McDBNode.
FormatOptional. A mcDBDataStyle enumeration, as described in settings.

The format the data is to be retieved in. This parameter is ignored when assigning the value of this property. If an inapplicable value from this parameter is passed in, mcdbActualObject is used.

valueA Variant value.

Settings

The settings for Format are:

ConstantValueDescription
 mcdbNoData0
 mcdbDefaultStyle1
 mcdbStringData1

value as a string

 mcdbStorage2

returned object implements IStream

 mcdbStream3

returned object implements IStorage

 mcdbBytes4

raw byte stream of object

 mcdbProgId5

the ProgID of the stored object

 mcdbLongData6

value as a Long (for mcdbEnum attributes only)

 mcdbGlobalID7

A database-global identifier of the object

 mcdbActualObject16

An IDispatch to the object, can be Ored with mcdbStorage and mcdbStream

Remarks

Since this property stores either a string or a BLOB, it can be a convenient place to store information that may be stored in both representations (e.g. a file, which may be represented by a string filepath or a BLOB of the bytes in the file). Since, McImage objects can be represented similarly, Data can be a convenient place to store images. (see the Example)

Exceptions

Error Value Description
E_ACCESSDENIED &H80070005 The McDBDatabase.LoggedUser does not have McDBRight.Write permission in the Rights for this McDBNode.
E_UNEXPECTED &H8001FFFF A framework error occurred while accessing this McDBNode.
E_INVALIDARG &H80070057 The Format requested is not compatible with the Data contained in the McDBNode.
STG_E_NOMOREFILES &H80030012 The BLOB in this Data is corrupted.

Notes

Not all mcDBDataStyle values are valid for all possible storage formats. For example: mcdbBytes will only work for data stored as a byte array or when an object supports the COM IPersistStream interface.