zoukankan      html  css  js  c++  java
  • ADO.NET Tips

    1. SqlCommand.ExecuteScalar Method

      Executes the query, and returns the first column of the first row in the result set returned by the query. Additional columns or rows are ignored.

    2. SqlCommand.ExecuteNonQuery Method

      Executes a Transact-SQL statement against the connection and returns the number of rows affected.

    3. 如果想拿到return value的值,可以在代码中新建一个ReturnValue类型的parameter, 但在数据库中不需要添加额外的parameter。具体如下

         SqlParameter parameter = new SqlParameter("@RETURN", SqlDbType.Int);
                    parameter.Direction = ParameterDirection.ReturnValue;

  • 相关阅读:
    封装cookie
    敏感词过滤
    面向对象改成选项卡
    正则表达式
    cookie
    DOM
    系统对象
    cookie记录用户名
    6个原则
    23中设计模式
  • 原文地址:https://www.cnblogs.com/qijiage/p/3270729.html
Copyright © 2011-2022 走看看