AddUnique Method

Collapse All Expand All Code: All Code: Multiple Code: C# Code: Visual Basic Code: Visual C++

C#
Visual Basic
Visual C++

Berkeley DB .NET API Documentation
BTreeCursor..::.AddUnique Method
BTreeCursor Class See Also Send Feedback

Insert the specified key/data pair into the database, unless a key/data pair comparing equally to it already exists in the database.

Namespace: BerkeleyDB
Assembly: libdb_dotnet62 (in libdb_dotnet62.dll) Version: 6.2.32.0

# Syntax

C#
    public void AddUnique(
    	KeyValuePair<DatabaseEntry, DatabaseEntry> pair
    )

Visual Basic (Declaration)
    Public Sub AddUnique ( _
    	pair As KeyValuePair(Of DatabaseEntry, DatabaseEntry) _
    )

Visual C++
    public:
    void AddUnique(
    	KeyValuePair<DatabaseEntry^, DatabaseEntry^> pair
    )

#### Parameters

pair
  Type: System.Collections.Generic..::.KeyValuePair<(Of <(DatabaseEntry, DatabaseEntry>)>)
  The key/data pair to be inserted

# Exceptions

Exception | Condition
--- | ---
BerkeleyDB..::.KeyExistException | Thrown if a matching key/data pair already exists in the database.

# See Also

BTreeCursor Class
BerkeleyDB Namespace