Store the key/data pair in the database, replacing any previously
existing key if duplicates are disallowed, or adding a duplicate
data item if duplicates are allowed.
Namespace:
BerkeleyDBAssembly: libdb_dotnet181 (in libdb_dotnet181.dll) Version: 18.1.32.0
Syntax
C# |
---|
public void Put( DatabaseEntry key, DatabaseEntry data, Transaction txn ) |
Visual Basic (Declaration) |
---|
Public Sub Put ( _ key As DatabaseEntry, _ data As DatabaseEntry, _ txn As Transaction _ ) |
Visual C++ |
---|
public: void Put( DatabaseEntry^ key, DatabaseEntry^ data, Transaction^ txn ) |
Parameters
- key
- Type: BerkeleyDB..::.DatabaseEntry
The key to store in the database
- data
- Type: BerkeleyDB..::.DatabaseEntry
The data item to store in the database
- txn
- 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.
Remarks
When partial put to a duplicate database, a DatabaseException is thrown.
Exceptions
Exception | Condition |
---|---|
BerkeleyDB..::.DatabaseException | Partial put to a duplicate database, or QueueDatabase or RecnoDatabase with fixed-length records. |