示例#1
0
 public void Update(ref TransactionQueue transqueue)
 {
     string[] updateSrc = this._dbProvider.GetDatabaseProvider().buildTableUpdateStatements(this).Split(';');
     foreach (string sqlStr in updateSrc)
         if(!sqlStr.Trim().Equals(""))
         transqueue.Queue(sqlStr);
 }
示例#2
0
        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;
        }