|
|
|
|
- Usage example of the HRestoreBackup function
Usage example of the HRestoreBackup function Example for restoring a unique database found on the server.
// Variables gnBckID is int New_connection is Connection // Connection parameters New_connection..Provider = hAccessHFClientServer New_connection..User = "PMO" New_connection..Password = "password" New_connection..Server = "MyHFServer" New_connection..Database = "" // To restore a single database, don't enter anything here New_connection..Encryption = hEncryptionNO // Create the backup Backup_Doc is hBackupDescription Backup_Doc..Description = "Doc Backup" Backup_Doc..WithIndex = True Backup_Doc..Destination = "Backup" Backup_Doc..Source = "031951/*" gnBckID = HBackup(New_connection, Backup_Doc) IF gnBckID = 0 THEN Error(HErrorInfo()) ELSE Info("Backup created, identifier:" + gnBckID) END // Close the connection IF HCloseConnection(New_connection) = False THEN Error(HErrorInfo()) ELSE Multitask(100) END // Restore the backup IF HRestoreBackup(New_connection, gnBckID) = False THEN Error("Failure restoring the backup" + HErrorInfo(hErrMessage)) ToClipboard(HErrorInfo()) ELSE Info("Restore operation successfully performed") END
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|