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
RecnoCursor..::.Duplicate Method
RecnoCursor Class See Also Send Feedback

Create a new cursor that uses the same transaction and locker ID as the original cursor.

Namespace: BerkeleyDB
Assembly: libdb_dotnet181 (in libdb_dotnet181.dll) Version: 18.1.32.0

# Syntax

C#
    public RecnoCursor Duplicate(
    	bool keepPosition
    )

Visual Basic (Declaration)
    Public Function Duplicate ( _
    	keepPosition As Boolean _
    ) As RecnoCursor

Visual C++
    public:
    RecnoCursor^ Duplicate(
    	bool keepPosition
    )

#### Parameters

keepPosition
  Type: System..::.Boolean
  If true, the newly created cursor is initialized to refer to the same position in the database as the original cursor (if any) and hold the same locks (if any). If false, or if the original cursor does not hold a database position and locks, the created cursor is uninitialized and behaves like a cursor newly created by Cursor()()().

#### Return Value

A newly created cursor

# Remarks

This is useful when an application is using locking and requires two or more cursors in the same thread of control.

# See Also

RecnoCursor Class
BerkeleyDB Namespace