PackDatabase(String,String,String,Int32,Int32,Boolean,Boolean,OperationCallbackDelegate) Method
In This Topic
Pack a specified database with support for changing database options like encryption key, page size, and culture and making an optional backup and use of callbacks for progress reporting.
Syntax
'Declaration
Public Overloads Shared Sub PackDatabase( _
ByVal As System.String, _
ByVal As System.String, _
ByVal As System.String, _
ByVal As System.Integer, _
ByVal As System.Integer, _
ByVal As System.Boolean, _
ByVal As System.Boolean, _
ByVal As OperationCallbackDelegate _
)
'Usage
Dim fileName As System.String
Dim encryptionPassword As System.String
Dim newEncryptionPassword 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, encryptionPassword, newEncryptionPassword, newPageSize, newLCID, newCaseSensitive, backup, operationCallbackDelegate)
public static void PackDatabase(
System.string ,
System.string ,
System.string ,
System.int ,
System.int ,
System.bool ,
System.bool ,
OperationCallbackDelegate
)
Parameters
- fileName
- File name of the database to pack.
- encryptionPassword
- The current encryption Password for the database, or null (Nothing) if not encrypted.
- newEncryptionPassword
- The new encryption Password to use, or null (Nothing) to leave database unencrypted.
- newPageSize
- New page size. Pass 0 to leave the page size at the current setting.
- newLCID
- New locale LocaleID. Pass 0 to leave the LocaleID with it's current setting.
- newCaseSensitive
- New case sensitivity setting.
- 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.
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