VistaDB 6
VistaDB.Provider Namespace / VistaDBConnection Class / RestoreDatabase Method / RestoreDatabase(String,String,String) Method
The filename of the backup file to restore from.
The filename of the new database to create. The file must not already exist.
Optional. The password used to encrypt the original database and its backup (if any).


In This Topic
    RestoreDatabase(String,String,String) Method
    In This Topic
    Restores a database from a backup file created by BackupDatabase(String)
    Syntax
    'Declaration
     
    
    Public Overloads Shared Sub RestoreDatabase( _
       ByVal backupFileName As System.String, _
       ByVal databaseFileName As System.String, _
       Optional ByVal encryptionPassword As System.String _
    ) 
    'Usage
     
    
    Dim backupFileName As System.String
    Dim databaseFileName As System.String
    Dim encryptionPassword As System.String
     
    VistaDBConnection.RestoreDatabase(backupFileName, databaseFileName, encryptionPassword)
    public static void RestoreDatabase( 
       System.string backupFileName,
       System.string databaseFileName,
       System.string encryptionPassword
    )

    Parameters

    backupFileName
    The filename of the backup file to restore from.
    databaseFileName
    The filename of the new database to create. The file must not already exist.
    encryptionPassword
    Optional. The password used to encrypt the original database and its backup (if any).
    Exceptions
    ExceptionDescription
    If the backupFileName or databaseFileName is null
    The backup does not appear to be in the VistaDB Backup format, is corrupted, or is from a newer version of VistaDB.
    Inspect the ErrorId for the specific failure.
    Remarks

    Restores a VistaDB Backup stored in backupFileName created with BackupDatabase(String) into a new database file specified by databaseFileName. If the original database was encrypted, then the encryptionPassword must be specified.

    The databaseFileName file must not already exist.

    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also