Description:
1. To back up the database (Medicine.MDB) has the following forms: ENTER table, exit table, Store Table
.........
2. Backup database (buMedicine.mdb) is placed in the DBBackup subdirectory of the current path.
3. Use the select ..... INTO ..... in SQL, add inquiry to Medicine.mdb,
Being the same as Medicine.mdb
The form is stored in the external database buMedicine.mdb.
4. Detailed program code is as follows:
Private subcmdbackup_click ()
DIM DBBU AS DATABASE
DIM STRSQL AS STRING
Dim dbuname as string
DBBuname = app.path & "/dbbackup/bumedicine.mdb"
IF Dir (DBBuname) <> "" "" "
Set dbbu = workspaces (0) .createdatabase (app.path & "/ dbbackup / buMedici
Ne.mdb ", dblanggeneral)
SET DBBU = OpenDatabase (app.path & "/medicine.mdb", false, false)
strsql = "SELECT ENTER. * INTO ENTER IN '" & dbbuname & "' from enter;"
Dbbu.execute strsql
Strsql = "SELECT EXIT. * INTO EXIT IN '" & dbbuname & "' from exit;"
Dbbu.execute strsql
Strsql = "Select Store. * INTO Store in '" & dbbuname & "' from store;"
Dbbu.execute strsql
..............
dbbu.close
SET DBBU = Nothing