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
DatabaseEnvironment..::.RenameDB Method (String, String, Boolean, Transaction)
DatabaseEnvironment Class See Also Send Feedback

Rename the underlying file represented by file using the value supplied to newname, incidentally renaming all of the databases it contained.

Namespace: BerkeleyDB
Assembly: libdb_dotnet62 (in libdb_dotnet62.dll) Version: 6.2.32.0

# Syntax

C#
    public void RenameDB(
    	string file,
    	string newname,
    	bool autoCommit,
    	Transaction txn
    )

Visual Basic (Declaration)
    Public Sub RenameDB ( _
    	file As String, _
    	newname As String, _
    	autoCommit As Boolean, _
    	txn As Transaction _
    )

Visual C++
    public:
    void RenameDB(
    	String^ file,
    	String^ newname,
    	bool autoCommit,
    	Transaction^ txn
    )

#### Parameters

file
  Type: System..::.String
  The physical file to be renamed.

newname
  Type: System..::.String
  The new name of the database or file.

autoCommit
  Type: System..::.Boolean
  If true, enclose RenameDB within a transaction. If the call succeeds, changes made by the operation are recoverable. If the call fails, the operation has made no changes.

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. If null, but autoCommit or AutoCommit is true, the operation is implicitly transaction protected.

# See Also

DatabaseEnvironment Class
RenameDB Overload
BerkeleyDB Namespace