VistaDB 5






VistaDB.Provider Namespace > VistaDBConnection Class > PackDatabase Method : PackDatabase(String,String,String,Int32,Int32,Boolean,Boolean,OperationCallbackDelegate) Method
Full database file name including path unless the database is in the local directory.
Current encryptionKey
New page size. Pass a 0 here to leave the page size at the current setting.
New locale LocaleID. Pass a value of 0 to leave the LocaleID with it's current setting.
New case sensitivity setting. This cannot be null, so if you want to preserve your case sensitivity you must pass the same value as the database was created with initially.
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 for feedback from pack progress. You may pass null or Nothing meaning there is no delegate.
PackDatabase(String,String,String,Int32,Int32,Boolean,Boolean,OperationCallbackDelegate) Method
Supports changing database options like encryption keys, page size, and culture as well as backups, and callbacks for progress reporting.
Syntax
'Declaration
 
Public Overloads Shared Sub PackDatabase( _
   ByVal fileName As System.String, _
   ByVal encryptionKeyString As System.String, _
   ByVal newencryptionKeyString As System.String, _
   ByVal newPageSize As System.Integer, _
   ByVal newLCID As System.Integer, _
   ByVal newCaseSensitive As System.Boolean, _
   ByVal backup As System.Boolean, _
   ByVal operationCallbackDelegate As OperationCallbackDelegate _
) 
'Usage
 
Dim fileName As System.String
Dim encryptionKeyString As System.String
Dim newencryptionKeyString As System.String
Dim newPageSize As System.Integer
Dim newLCID As System.Integer
Dim newCaseSensitive As System.Boolean
Dim backup As System.Boolean
Dim operationCallbackDelegate As OperationCallbackDelegate
 
VistaDBConnection.PackDatabase(fileName, encryptionKeyString, newencryptionKeyString, newPageSize, newLCID, newCaseSensitive, backup, operationCallbackDelegate)
public static void PackDatabase( 
   System.string fileName,
   System.string encryptionKeyString,
   System.string newencryptionKeyString,
   System.int newPageSize,
   System.int newLCID,
   System.bool newCaseSensitive,
   System.bool backup,
   OperationCallbackDelegate operationCallbackDelegate
)
public procedure PackDatabase( 
    fileName: System.String;
    encryptionKeyString: System.String;
    newencryptionKeyString: System.String;
    newPageSize: System.Integer;
    newLCID: System.Integer;
    newCaseSensitive: System.Boolean;
    backup: System.Boolean;
    operationCallbackDelegate: OperationCallbackDelegate
); static; 
public static function PackDatabase( 
   fileName : System.String,
   encryptionKeyString : System.String,
   newencryptionKeyString : System.String,
   newPageSize : System.int,
   newLCID : System.int,
   newCaseSensitive : System.boolean,
   backup : System.boolean,
   operationCallbackDelegate : OperationCallbackDelegate
);
public: static void PackDatabase( 
   System.string* fileName,
   System.string* encryptionKeyString,
   System.string* newencryptionKeyString,
   System.int newPageSize,
   System.int newLCID,
   System.bool newCaseSensitive,
   System.bool backup,
   OperationCallbackDelegate* operationCallbackDelegate
) 
public:
static void PackDatabase( 
   System.String^ fileName,
   System.String^ encryptionKeyString,
   System.String^ newencryptionKeyString,
   System.int newPageSize,
   System.int newLCID,
   System.bool newCaseSensitive,
   System.bool backup,
   OperationCallbackDelegate^ operationCallbackDelegate
) 

Parameters

fileName
Full database file name including path unless the database is in the local directory.
encryptionKeyString
Current encryptionKey
newencryptionKeyString
newPageSize
New page size. Pass a 0 here to leave the page size at the current setting.
newLCID
New locale LocaleID. Pass a value of 0 to leave the LocaleID with it's current setting.
newCaseSensitive
New case sensitivity setting. This cannot be null, so if you want to preserve your case sensitivity you must pass the same value as the database was created with initially.
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 for feedback from pack progress. You may pass null or Nothing meaning there is no delegate.
Remarks
You may be prompted on connection open 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