View Full Version : Question Archive or Backup


BrettM
08-17-2008, 06:35 AM
Hi again guys,

I am using the TransferDatabase acExport/acImport function to backup and restore my table data. Does anyone have any suggestions re a reasonably simple function to act as acCompare - which obviously doesn't exist (but should :rolleyes:) - so I can verify that good things happened with the backup?

Regards Brett

Alisa
08-20-2008, 12:55 PM
If you get the number of records you are exporting before you export, you could then link to the exported table and count the number of records there to see if it matches . . . if the number of records is right, then probably nothing went wrong in the export.

DCrake
08-21-2008, 03:32 AM
One solution is to create a union query that counts the number of records in each table, thus.

SELECT Count(PK) AS Records, "Table 1" As Table FROM Table1
UNION SELECT Count(PK) AS Records, "Table 2" As Table FROM Table2
UNION SELECT Count(PK) AS Records, "Table 3" As Table FROM Table3
etc

Then replicate this for the backup database

Run both queries and compare the differences

CodeMaster::cool: