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..::.ResetFileID Method
DatabaseEnvironment Class See Also Send Feedback

Allow database files to be copied and used in the same database environment as the original.

Namespace: BerkeleyDB
Assembly: libdb_dotnet60 (in libdb_dotnet60.dll) Version: 6.0.20.0

# Syntax

C#
    public void ResetFileID(
    	string file,
    	bool encrypted
    )

Visual Basic (Declaration)
    Public Sub ResetFileID ( _
    	file As String, _
    	encrypted As Boolean _
    )

Visual C++
    public:
    void ResetFileID(
    	String^ file,
    	bool encrypted
    )

#### Parameters

file
  Type: System..::.String
  The name of the physical file in which new file IDs are to be created.

encrypted
  Type: System..::.Boolean
  If true, the file contains encrypted databases.

# Remarks

All databases contain an ID string used to identify the database in the database environment cache. If a physical database file is copied, and used in the same environment as another file with the same ID strings, corruption can occur. ResetFileID creates new ID strings for all of the databases in the physical file.

ResetFileID modifies the physical file, in-place. Applications should not reset IDs in files that are currently in use.

# See Also

DatabaseEnvironment Class
BerkeleyDB Namespace