company logo

Property :: setAccessVersion - Convert Timestamp to instance version

When the instance data type inherits from __OBJECT , instance version may be obtained by timestamp. The function tries to locate the instance version with the maximum timestamp, that is lower or equal than the time stamp passed. The function sets the access version for the property handle to the version number of the located instance.

The function returns the version number for the selected instance (access version). When the data type does not inherit from __OBJECT , or when no instance is selected, the function throws an exception. The function also throws an exception, when the property handle does not support version functions (e.g. for attributes) or when the database does not support versioning (no versioning mode defined).

Notes:

One cannot change instance version for attributes. One may also not select property version by time stamp, since collection are not time-stamped.

Return value:  Instance version number ( uint32  )

Instance version numbers are assigned version numbers to individual instances.

Implementation overview

Implementation details

  1. Set Acees version to "last" version
    uint32 Property  :: setAccessVersion (  )

    In order to obtain the latest version stored for instances, the function sets the version number to 0xFFFFFFFF.

  2. to list
  3. Set access version to requsted version number
    uint32 Property  :: setAccessVersion ( uint32 uVersion )
    • uVersion - Instance version number

      Instance version numbers are assigned version numbers to individual instances.

  4. to list
  5. Select access version by timestamo
    uint32 Property  :: setAccessVersion ( odaba::DateTime &cDateTime )

    When instances inherit from _OBJECT, the version may be selected by time stamp.

    • cDateTime - Time stamp

      A time stamp combines date and time

  6. to list