Example #1
0
        /// <summary>
        /// 获取Sql语句内容
        /// </summary>
        /// <returns>Sql语句内容</returns>
        public override String GetCommandText()
        {
            SqlCommandBuilder sb = new SqlCommandBuilder(this._database);

            sb.AppendUpdatePrefix().AppendTableName(this._tableName);

            if (this._updateFields.Count > 0)
            {
                sb.AppendUpdateSet();
            }

            sb.AppendAllParameterEquations(this._updateFields).AppendWhere(this._where);

            return(sb.ToString());
        }
        /// <summary>
        /// 输出SQL语句
        /// </summary>
        /// <returns>SQL语句</returns>
        public override String ToString()
        {
            SqlCommandBuilder sb = new SqlCommandBuilder(this.DatabaseType);

            sb.AppendUpdatePrefix().AppendTableName(this._tableName);

            if (this._parameters.Count > 0)
            {
                sb.AppendUpdateSet();
            }

            sb.AppendAllParameterEquations(this._parameters).AppendWhere(this._where);

            return(this.FollowingProcessSql(sb.ToString()));
        }
Example #3
0
        /// <summary>
        /// 获取Sql语句内容
        /// </summary>
        /// <returns>Sql语句内容</returns>
        public override String GetCommandText()
        {
            SqlCommandBuilder sb = new SqlCommandBuilder(this._database);

            sb.AppendUpdatePrefix().AppendTableName(this._tableName);

            if (this._parameters.Count > 0)
            {
                sb.AppendUpdateSet();
            }

            sb.AppendAllParameterEquations(this._parameters).AppendWhere(this._where);

            return sb.ToString();
        }