代码之家  ›  专栏  ›  技术社区  ›  markE

RIA服务是否有类似于sqlclient sqlcommand的东西来执行T-SQL?

  •  0
  • markE  · 技术社区  · 15 年前

    RIA服务会怎么做?

    using (SqlConnection connection = new SqlConnection(connectionString))
    {
        string TSQL="update products set price=price*1.03 where category='computer books'";
        SqlCommand command = new SqlCommand(TSQL, connection);
        command.Connection.Open();
        command.ExecuteNonQuery();
    }
    

    谢谢,马克

    1 回复  |  直到 15 年前
        1
  •  0
  •   Sergii Lutai    15 年前

    您需要获取所有类别的产品 电脑书籍 然后更新价格并将更改保存到数据库。

    推荐文章