public DataTable GetProDataTable(string produceName, SqlParameter[] para) { DataTable dt = new DataTable(); SqlCommand command = new SqlCommand(produceName, this.sqlconn); if (this.sqlTran != null) { command.Transaction = this.sqlTran; } if (this.CommandTimeout != -1) { command.CommandTimeout = this.CommandTimeout; } command.CommandType = CommandType.StoredProcedure; command.Parameters.AddRange(para); try { /* 这部分代码会占满连接池,产生异常 if (this.sqlconn.State == ConnectionState.Closed) { this.sqlconn.Open(); } */ SqlDataAdapter adapter = new SqlDataAdapter(command); adapter.Fill(dt); } catch (SqlException ex) { //OriginalLog.Error(ex.ToString()); throw (ex); } return dt; }
sqlserver超时时间已到
免责声明:文章转载自《sqlserver超时时间已到》仅用于学习参考。如对内容有疑问,请及时联系本站处理。
上篇使用yum安装php72element-ui自定义table表头,修改标题样式、添加tooltip及 :render-header使用简介下篇
宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=