コード例 #1
0
ファイル: ATable.cs プロジェクト: andrewjc/sqlconsole
        public bool Update()
        {
            // This method naturally supports transactions. It will return -1 if the transaction fails.
            TransactionQueue tq = new TransactionQueue(this._dbProvider);
            tq.UseAutoExecute = false;

            string[] updateSrc = this._dbProvider.GetDatabaseProvider().buildTableUpdateStatements(this).Split(';');
            foreach (string sqlStr in updateSrc)
                tq.Queue(sqlStr);

            if (!tq.Parse())
                return false;

            this._dbProvider.GetTableCache().cacheTable(this.name);
            return true;
        }