连接池
来源:互联网 发布:曼哈顿软件 编辑:程序博客网 时间:2024/05/21 05:40
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Diagnostics;
namespace ADO_dataReader
{
public partial class connectionPool : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string constr = "data source=PC-20120907SDQU;initial catalog=School;User Id=sa;password=admin;";
Stopwatch watch = new Stopwatch();
watch.Start();
for (int i = 0; i < 2000; i++)
{
using (SqlConnection con = new SqlConnection(constr))
{
con.Open();
con.Close();
}
}
watch.Stop();
Response.Write(watch.Elapsed);
Response.Write("连接打开又关闭了!");
}
}
}
- 连接池连接mysql
- 连接池管理连接
- 连接池连接数据库
- 连接池
- 连接池
- 连接池
- 连接池
- 连接池
- 连接池
- 连接池
- 连接池
- 连接池
- 连接池
- 连接池
- 连接池
- 连接池
- 连接池
- 连接池
- 01背包问题
- 使用spring web.xml里的配置 - 请求处理器DispatcherServlet
- 多线程中锁的实现.
- zoj1002-Fire Net
- 如何得到shell的返回值 (kettle)
- 连接池
- sqlite数据库处理时间问题 和 日期时间函数
- Sudoku解题算法
- Deformable Part Model的学习
- JQuery.BlockUI
- openstack删除数据库中instance关联表(没验证)
- makefile模板文件
- 简单数据绑定
- how to invisible the plot image in matlab