Physically truncate the underlying file, discarding all previous databases it might have held.

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


public bool Truncate
Visual Basic (Declaration)
Public Truncate As Boolean
Visual C++
bool Truncate


Underlying filesystem primitives are used to implement this flag. For this reason, it is applicable only to the file and cannot be used to discard databases within a file.

This setting cannot be lock or transaction-protected, and it is an error to specify it in a locking or transaction-protected environment.

See Also