Backup | programs | recovery
adaptive Server Anywhere (ASA in this article) is a database management system that is PowerBuilder (Pb in this paper) and can be used as a database server for small application systems. And the backup/restore of the database is a basic work, can you do it in just a few minutes to complete the writing of this kind of program? This article will introduce a PB with the ASA Backup/recovery program, only a short time, can be completed and applied to ASA Data Environment for small applications.
A backup program
First take a look at the backup program part of the wording. Create a text box sle_1 on the form to display the file name of the backup and add two buttons: cb_1 (Browse), cb_2 (Backup). The corresponding event code is as follows:
Two recovery program
Let's take a look at the preparation of the recovery database program. Build a text box sle_1 on the form, display the backup file name for recovery, and add two buttons: cb_1 (Find), cb_2 (Restore). Declare an API function that modifies file properties:
function ulong SetFileAttributes (ref string Lpfilename,ulong dwfileattributes) LIBRARY "kernel32.dll" ALIAS for " Setfileattributesa "
Summary of the Three
The implementation of the program backup and restore all just call the SQL built-in function to achieve, so that the program appears relatively concise. Although the function is single and simple, it can also meet the needs of database backup and recovery, and can save a lot of energy for the database administrators in the application situations where the requirements are not high. The above program is debugged in PB 9.0.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.