ComponentOne True DataControl 8.0
Insert Method (XArrayDB)

Syntax

XArrayDB.Insert nDim, index

Method applies to XArrayDB object.

Arguments

nDim is a one-based integer specifying an array dimension.

index is a long integer specifying an element position within the dimension nDim.

Return Value

None

Description

This method inserts a new element at position index into the dimension specified by nDim while preserving data and shifting the indexes of the existing elements appropriately.

The nDim argument should be 1 for rows and 2 for columns. A trappable error occurs if an invalid dimension is specified.

If index is greater than the value of the UpperBound property for dimension nDim, then UpperBound is adjusted to the new index.

NOTE: This method is provided for backward compatibility with the XArray object. Both of the following statements insert a new row at index position n.

MyArray.Insert 1, n

MyArray.InsertRows n

Similarly, both of the following statements insert a new column at index position n:

MyArray.Insert 2, n

MyArray.InsertColumns n

Unlike Insert, the InsertRows and InsertColumns methods support the insertion of multiple contiguous elements.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback