Пример #1
0
        public void TestRecovery()
        {
            m_dbRecovery = new DbRecovery3060(@"C:\Documents and Settings\mha\Dokumenter\SummaSummarum\dbRecovery3060.sdf");
            //m_dbRecovery.CreateDatabase();
            //TblRecoveryPoint rec_RceoveryPoint = setupRecoveryPoint();
            //createRecoveryPoint(rec_RceoveryPoint);

            //TblRecoveryPoint rec_RestorePoint = setupRestorePoint();
            //restoreRecoveryPoint(rec_RestorePoint);

            //deleteContentNotUsed();
        }
Пример #2
0
        public void createRecoveryPoint()
        {
            Program.dbData3060          = null;
            Program.karMedlemmer        = null;
            Program.memMedlemDictionary = null;
            Program.memAktivRegnskab    = null;
            Program.memPbsnetdir        = null;
            Program.karDkkonti          = null;
            Program.karFakturaer_s      = null;
            Program.karFakturastr_s     = null;
            Program.karFakturavarer_s   = null;
            Program.karKortnr           = null;
            Program.karRegnskab         = null;
            Program.karStatus           = null;
            Program.karKladde           = null;

            // unlock lock summasummarum kontoplan
            Program.filestream_to_lock_summasummarum_kontoplan.Close();
            Program.filestream_to_lock_summasummarum_kontoplan = null;

            // open recoverypoint database
            string dbRecovery3060path = m_EksportmappePath + @"dbRecovery3060.sdf";

            m_dbRecovery = new DbRecovery3060(m_EksportmappePath + @"dbRecovery3060.sdf");
            if (!File.Exists(dbRecovery3060path))
            {
                m_dbRecovery.CreateDatabase();
            }

            // create recoverypoint
            TblRecoveryPoint rec_RceoveryPoint = setupRecoveryPoint();

            createRecoveryPoint(rec_RceoveryPoint);

            // lock lock summasummarum kontoplan
            Program.filestream_to_lock_summasummarum_kontoplan = new FileStream(Program.path_to_lock_summasummarum_kontoplan, FileMode.Open, FileAccess.Read, FileShare.None);
        }