Policy for duplicate data items in the database; that is, insertion when the key of the key/data pair being inserted already exists in the database will be successful.

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


public DuplicatesPolicy Duplicates
Visual Basic (Declaration)
Public Duplicates As DuplicatesPolicy
Visual C++
DuplicatesPolicy Duplicates


The ordering of duplicates in the database for UNSORTED is determined by the order of insertion, unless the ordering is otherwise specified by use of a cursor operation or a duplicate sort function. The ordering of duplicates in the database for SORTED is determined by the duplicate comparison function. If the application does not specify a comparison function using DuplicateCompare, a default lexical comparison will be used.

SORTED is preferred to UNSORTED for performance reasons. UNSORTED should only be used by applications wanting to order duplicate data items manually.

If the database already exists, the value of Duplicates must be the same as the existing database or an error will be returned.

See Also