VistaDB 6
VistaDB.Provider Namespace / VistaDBConnection Class / PackDatabase Method / PackDatabase(String,String,Boolean,OperationCallbackDelegate) Method
File name of the database to pack.
The encryption Password for the database, or null (Nothing) if not encrypted.
True to create a backup copy before packing. The backup file will have the same filename but with .backupCopy appended. If a file by that name already exists it will be overwritten.
VistaDB.DDA.OperationCallbackDelegate method for feedback of pack progress. You may pass null (or Nothing) if callbacks are not needed.


In This Topic
    PackDatabase(String,String,Boolean,OperationCallbackDelegate) Method
    In This Topic
    Pack a specified database with support for making an optional backup and use of callbacks for progress reporting.
    Syntax
    'Declaration
     
    
    Public Overloads Shared Sub PackDatabase( _
       ByVal fileName As System.String, _
       ByVal encryptionPassword As System.String, _
       ByVal backup As System.Boolean, _
       ByVal operationCallbackDelegate As OperationCallbackDelegate _
    ) 
    'Usage
     
    
    Dim fileName As System.String
    Dim encryptionPassword As System.String
    Dim backup As System.Boolean
    Dim operationCallbackDelegate As OperationCallbackDelegate
     
    VistaDBConnection.PackDatabase(fileName, encryptionPassword, backup, operationCallbackDelegate)
    public static void PackDatabase( 
       System.string fileName,
       System.string encryptionPassword,
       System.bool backup,
       OperationCallbackDelegate operationCallbackDelegate
    )

    Parameters

    fileName
    File name of the database to pack.
    encryptionPassword
    The encryption Password for the database, or null (Nothing) if not encrypted.
    backup
    True to create a backup copy before packing. The backup file will have the same filename but with .backupCopy appended. If a file by that name already exists it will be overwritten.
    operationCallbackDelegate
    VistaDB.DDA.OperationCallbackDelegate method for feedback of pack progress. You may pass null (or Nothing) if callbacks are not needed.
    Remarks
    Pack database to recover unused space and re-balance the storage of tables and indexes.
    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