Set the cursor to refer to the first key/data pair of the database, and store the secondary key along with the corresponding primary key/data pair in Current. If the first key has duplicate values, the first data item in the set of duplicates is stored in Current. If key, or pkey, or data is partial DatabaseEntry, its PartialLen bytes starting PartialOffset bytes from the beginning of the retrieved data record are returned as if they comprised the entire record. If any or all of the specified bytes do not exist in the record, MoveFirst is successful, and any existing bytes are returned.

Namespace:  BerkeleyDB
Assembly:  libdb_dotnet52 (in libdb_dotnet52.dll) Version:


public bool MoveFirst(
	DatabaseEntry key,
	DatabaseEntry pkey,
	DatabaseEntry data,
	LockingInfo info
Visual Basic (Declaration)
Public Function MoveFirst ( _
	key As DatabaseEntry, _
	pkey As DatabaseEntry, _
	data As DatabaseEntry, _
	info As LockingInfo _
) As Boolean
Visual C++
bool MoveFirst(
	DatabaseEntry^ key, 
	DatabaseEntry^ pkey, 
	DatabaseEntry^ data, 
	LockingInfo^ info


Type: BerkeleyDB..::.DatabaseEntry
The retrieved key in secondary db
Type: BerkeleyDB..::.DatabaseEntry
The retrieved key in primary db
Type: BerkeleyDB..::.DatabaseEntry
The retrieved data in primary db
Type: BerkeleyDB..::.LockingInfo
The locking behavior to use.

Return Value

True if the cursor was positioned successfully, false otherwise.


If positioning the cursor fails, Current will contain an empty KeyValuePair<(Of <(TKey, TValue>)>).

See Also