MoveRootKey method

Delphi Example

C++ Builder Example

 

Builder Syntax

int __fastcall MoveRootKey (void);

Delphi Syntax

Function MoveRootKey (): Integer;

Overview

Refer to Working with Key Elements.

Remarks

Updates the CurrentElement property to the root of the key element specified in the CurrentElement property.

The root is the Level 0 ancestor of the key element specified in the CurrentElement property. If the CurrentElement property specifies a key element on Level 0, the CurrentElement property will be updated with the same key element. Please note that the numbering of the items in this illustration is arbitrary and does not imply order.

image\GetRoot.gif

If the CurrentElement property contains:

The CurrentElement property will be updated with :

Item 1

Item 2

Item 3

Item 2

Item 4

Item4

Item 5

Item 6

The following methods will also help you navigate the Data Set:

MoveFirstKey method

MoveLastKey method

MoveNextKey method

MoveParentKey method

MoveChildKey method

Note:

Visual Basic users can either check the return value of the method, or capture and process errors to determine whether the MovexxxElement methods have completed successfully.

See Also

Elements:

MoveFirstKey method, MoveLastKey method, MoveNextKey method, MovePrevKey method, MoveParentKey method, MoveChildKey method