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;

  • 相关阅读:
    食谱
    食谱
    食谱
    无题
    重要通知
    幼儿食谱
    安卓应用开发常用代码
    安卓开发环境搭建
    《浪潮之巅》读书笔记——第11章 摩托罗拉
    预制redis数据
  • 原文地址:https://www.cnblogs.com/qijiage/p/3270729.html
Copyright © 2011-2022 走看看