コード例 #1
0
        public bool restoreDbTest(
            string sDbName,
            string sBackupPath,
            DbSystem dbSystem)
        {
            MyRestoreStatus restoreStatus = null;

            // Try restoring the database

            beginTest("Restore Database Test (from directory \"" + sBackupPath + "\" to " + sDbName + ")");

            restoreStatus = new MyRestoreStatus();
            try
            {
                dbSystem.dbRestore(sDbName, null, null, sBackupPath, null,
                                   null, restoreStatus);
            }
            catch (XFlaimException ex)
            {
                endTest(restoreStatus.outputLines(), ex, "restoring database");
                return(false);
            }

            endTest(restoreStatus.outputLines(), true);
            return(true);
        }