Description

Returns a reference to a Database McDBNode for a visible object.

Return Type

A McDBNode object.   A McDBNode with the McDBNode representing the Database object.
Failure Returns Nothing

Failure conditions:
* Invalid argument
* Criteria does not specify a Database Object.
* Journal was not opened from a Database Object.

Syntax

object.ObjectToDatabase (pUnknown, [lAncestorLevel])

The ObjectToDatabase Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McDataJournal.
pUnknownRequired. An IUnknown object. The visible object that may be related to a database object
lAncestorLevelOptional. A Long value. Return the ancestor of the found Journal object and then returns the related database object (where 1 is the parent).

Remarks

Use ObjectHasDatabase to determine whether a database object is linked to the object without getting the object.