• C#执行带返回值的储存过程


            /// <summary>
            /// 获得DATASET数据列表
            /// </summary>
            public DataSet GetListOutParm(string strWhere,ref StringBuilder suc)
            {
                SqlParameter[] parameters = {
         new SqlParameter("@JG_NAME", SqlDbType.VarChar,50),
                         new SqlParameter("@sucess", SqlDbType.VarChar,50)
                };
                parameters[0].Value = "%%";
                parameters[1].Direction = ParameterDirection.Output;
                DataSet ds = DbHelperSQL.RunProcedure("UP_HIS_JGXX_GetList", parameters, "ds");
                string sucess = Convert.ToString(parameters[1].Value);
                suc = new StringBuilder(1024);
                suc.Append(sucess);
                return ds;
            }

            /// <summary>
            /// 返回参数
            /// </summary>
            public string  GetOutParm()
            {
                SqlParameter[] parameters = {
         new SqlParameter("@JG_NAME", SqlDbType.VarChar,50),
                         new SqlParameter("@sucess", SqlDbType.VarChar,50)
                };
                parameters[0].Value = "%%";
                parameters[1].Direction = ParameterDirection.Output;
                DataSet ds = DbHelperSQL.RunProcedure("UP_HIS_JGXX_GetList", parameters, "ds");
                return Convert.ToString(parameters[1].Value); ;
            }

  • 相关阅读:
    LPR之我见
    安装tensorflow2.2cpu的简洁方法
    anaconda安装keras
    redis 查看当前连接数
    2020 8 14
    docker安装jenkins
    使用docker安装gitlab
    提问:游戏测试与一般的软件测试的区别在哪里?
    “战斗天使”- 测试媛是如何崛起的?
    关系型数据库的几种常用主键
  • 原文地址:https://www.cnblogs.com/leischen/p/2275104.html
Copyright © 2020-2023  润新知