Beispiel #1
0
        public int DeleteDataBlockAndRecords()
        {
            SQLDB sqlDB = new SQLDB(connectionString);
            int deletedCount = 3;
            try
            {
                sqlDB.OpenConnection();
                sqlDB.OpenTransaction();

                // deletedCount = dataRecord.DeleteAllData(sqlDB);
                sqlDB.DeleteAllDataRecordsFast(DATA_BLOCK_ID);
                sqlDB.DeleteDataBlock(DATA_BLOCK_ID);

                sqlDB.CommitConnection();
                sqlDB.CloseConnection();
            }
            catch (Exception ex)
            {
                sqlDB.RollbackConnection();
                sqlDB.CloseConnection();
                throw ex;
            }
            return deletedCount + 1;
        }