Truncate Method

Collapse All Expand All Code: All Code: Multiple Code: C# Code: Visual Basic Code: Visual C++

C#
Visual Basic
Visual C++

Berkeley DB .NET API Documentation
BaseDatabase..::.Truncate Method
BaseDatabase Class See Also Send Feedback

Empty the database, discarding all records it contains.

Namespace: BerkeleyDB
Assembly: libdb_dotnet51 (in libdb_dotnet51.dll) Version: 5.1.19.0

# Syntax

C#
    public uint Truncate()

Visual Basic (Declaration)
    Public Function Truncate As UInteger

Visual C++
    public:
    unsigned int Truncate()

#### Return Value

The number of records discarded from the database.

# Remarks

If the operation occurs in a transactional database, the operation will be implicitly transaction protected.

# See Also

BaseDatabase Class
Truncate Overload
BerkeleyDB Namespace