Insert Method

Names Object

Description

Inserts a new string into the Names collection.

Visual Basic

Names.Insert (
[NewName :=] strName,
[InsertBeforeItem :=] {strBeforeName | lBeforeOrdinal} )

C++

HRESULT pNames->InsertByName (
SQLOLE_LPCSTR
strName,
SQLOLE_LPCSTR
strBeforeName );

HRESULT pNames->InsertByOrd (
SQLOLE_LPCSTR
strName,
long
lBeforeOrdinal );

Elements

Element Type Description

strName String New string to insert into Names collection.
strBeforeName String Name before which the new string is inserted. If empty, the new string is added as the last string in the Names collection.
lBeforeOrdinal Long Ordinal value into the collection of the Name before which the new Name is inserted.

For Visual Basic the first ordinal value is number 1. If 0 is specified, the new string is added as the last string in the Names collection.

For C++ the first ordinal value is 0. If -1 is specified, the new string is added as the last string in the Names collection.


Remarks

For the Configuration.Parameters Names collection, new strings are always inserted as the last string in the collection.