The ITDatum interface
The ITDatum interface is derived from ITValue and provides additional methods to get and set the underlying binary data and to obtain the connection object on which the value object was created. Value objects expose ITDatum to be able to participate in complex object updates.
The ITDatum::Data() method returns the (constant) pointer to the binary data. The memory for this data is managed by the object. An application does not attempt to modify the memory returned by Data(). For text data, Data() returns the pointer to MI_LVARCHAR, for row data, the pointer to MI_ROW, and for collections, the pointer to MI_COLLECTION.
The ITDatum::DataLength() method returns the length of underlying data. For opaque structures (such as MI_ROW and MI_COLLECTION), the value returned by DataLength() is not meaningful to the application.
The ITDatum::SetData() method sets the value object data to the data provided as the argument. The data must be in the same form as returned by ITDatum::Data(). For opaque structures the data length is ignored.
The ITDatum::Connection() method returns (by reference) the connection object that was used in the instantiation of the value object.
Generally, the C++ Interface uses ITDatum() members to update the row or collection of objects.