VistaDB 5






VistaDB.Provider Namespace > VistaDBConnection Class > PackDatabase Method : PackDatabase(String,String,Boolean,OperationCallbackDelegate) Method
Full database file name including path unless the database is in the local directory.
String used as base for generating encryption crypto key. Null or Nothing for non encrypted database.
True to create a backup copy before packing. The backup file will be named the same as the original database, but with a .backupCopy appended to the end of the filename. If the file exists it will be overwritten.
Operation Information delegate method giving feedback during long running operations. You may pass null or Nothing meaning there is no delegate to callback.
PackDatabase(String,String,Boolean,OperationCallbackDelegate) Method
Supports encrypted databases, backups, and callbacks for progress reporting.
Syntax
'Declaration
 
Public Overloads Shared Sub PackDatabase( _
   ByVal fileName As System.String, _
   ByVal encryptionKeyString As System.String, _
   ByVal backup As System.Boolean, _
   ByVal operationCallbackDelegate As OperationCallbackDelegate _
) 
'Usage
 
Dim fileName As System.String
Dim encryptionKeyString As System.String
Dim backup As System.Boolean
Dim operationCallbackDelegate As OperationCallbackDelegate
 
VistaDBConnection.PackDatabase(fileName, encryptionKeyString, backup, operationCallbackDelegate)
public static void PackDatabase( 
   System.string fileName,
   System.string encryptionKeyString,
   System.bool backup,
   OperationCallbackDelegate operationCallbackDelegate
)
public procedure PackDatabase( 
    fileName: System.String;
    encryptionKeyString: System.String;
    backup: System.Boolean;
    operationCallbackDelegate: OperationCallbackDelegate
); static; 
public static function PackDatabase( 
   fileName : System.String,
   encryptionKeyString : System.String,
   backup : System.boolean,
   operationCallbackDelegate : OperationCallbackDelegate
);
public: static void PackDatabase( 
   System.string* fileName,
   System.string* encryptionKeyString,
   System.bool backup,
   OperationCallbackDelegate* operationCallbackDelegate
) 
public:
static void PackDatabase( 
   System.String^ fileName,
   System.String^ encryptionKeyString,
   System.bool backup,
   OperationCallbackDelegate^ operationCallbackDelegate
) 

Parameters

fileName
Full database file name including path unless the database is in the local directory.
encryptionKeyString
String used as base for generating encryption crypto key. Null or Nothing for non encrypted database.
backup
True to create a backup copy before packing. The backup file will be named the same as the original database, but with a .backupCopy appended to the end of the filename. If the file exists it will be overwritten.
operationCallbackDelegate
Operation Information delegate method giving feedback during long running operations. You may pass null or Nothing meaning there is no delegate to callback.

Return Value

void
Remarks
You may be prompted to pack the database if the file format has changed.
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