zoukankan      html  css  js  c++  java
  • asp.net 调用sql存储过程

    public DataSet Bkklist(Dush.common.booklist bkl)
            {
                SqlConnection stcon = new SqlConnection(Dush.dataaccess.conn.sqlconn);
                SqlCommand cmd = new SqlCommand("GetCategories", stcon); //存储过程名GetCategories
                cmd.CommandType = CommandType.StoredProcedure; //声明调用存储过程


                cmd.Parameters.Add(new SqlParameter("CategoriyId",SqlDbType.Int ));

                cmd.Parameters["CategoriyId"].Value = bkl.CategoriyId1;

                DataSet ds = new DataSet();
                SqlDataAdapter sda = new SqlDataAdapter(cmd);
                try
                {
                    sda.Fill(ds);
                    return ds;
                }
                catch (System.Exception E)
                {
                    throw new System .Exception (E.Message);
                }
               

            }

  • 相关阅读:
    iOS 字体
    接口继承和实现继承的区别
    实验楼实验——LINUX基础入门
    试看看能不能发布
    mysql binlog恢复
    percona
    ssh2 php扩展
    sphinx
    ngios
    socketlog
  • 原文地址:https://www.cnblogs.com/Leo_wl/p/1763851.html
Copyright © 2011-2022 走看看