Store the key/data pair in the database, only if the key does not already appear in the database.

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


public void PutNoOverwrite(
	DatabaseEntry key,
	DatabaseEntry data,
	Transaction txn
Visual Basic (Declaration)
Public Sub PutNoOverwrite ( _
	key As DatabaseEntry, _
	data As DatabaseEntry, _
	txn As Transaction _
Visual C++
void PutNoOverwrite(
	DatabaseEntry^ key, 
	DatabaseEntry^ data, 
	Transaction^ txn


Type: BerkeleyDB..::.DatabaseEntry
The key to store in the database
Type: BerkeleyDB..::.DatabaseEntry
The data item to store in the database
Type: BerkeleyDB..::.Transaction
If the operation is part of an application-specified transaction, txn is a Transaction object returned from BeginTransaction()()(); if the operation is part of a Berkeley DB Concurrent Data Store group, txn is a handle returned from BeginCDSGroup()()(); otherwise null.


This enforcement of uniqueness of keys applies only to the primary key, the behavior of insertions into secondary databases is not affected. In particular, the insertion of a record that would result in the creation of a duplicate key in a secondary database that allows duplicates would not be prevented by the use of this flag.

See Also