VistaDB 6
VistaDB.Provider Namespace / VistaDBConnection Class / BackupDatabase Method / BackupDatabase(String) Method
The filename of the destination file to write the backup to, which must not already exist.


In This Topic
    BackupDatabase(String) Method
    In This Topic
    Backup the current database to a file.
    Syntax
    'Declaration
     
    
    Public Overloads Sub BackupDatabase( _
       ByVal backupFileName As System.String _
    ) 
    'Usage
     
    
    Dim instance As VistaDBConnection
    Dim backupFileName As System.String
     
    instance.BackupDatabase(backupFileName)
    public void BackupDatabase( 
       System.string backupFileName
    )

    Parameters

    backupFileName
    The filename of the destination file to write the backup to, which must not already exist.
    Exceptions
    ExceptionDescription
    If the backupFileName is null
    If the file specified in backupFileName already exists.
    If the database is not in a valid open mode for compression.
    Remarks

    A compressed backup of the currently open database will be made into a new file specified by backupFileName, preserving the encryption of the database (if any). The backup cannot be opened directly and must be restored using the RestoreDatabase(String,String,String) method to be operational.

    The connection to the database must have the VistaDB.VistaDBDatabaseOpenMode set to ExclusiveReadOnly, ExclusiveReadWrite, or SharedReadOnly to back up the database. This ensures no other process is modifying data while the back up is being performed.

    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