最近做了一个进销存系统,正在做测试,昨天用一款软件做自动添加数据的时候,添加到50条左右,就异常了,异常的内容是
error connecting:Timeout expired. The tumeout period
elapsed prior to obtaining a connection from the pool.
this may have occurred because all pooled connections were in use and max pool size
研究了下,好像是说数据库中查询的异常。
是不是因为数据库打开后,一直在操作,并没有关闭而导致的问题呢??小弟不敢确定,枉大家解答。谢谢
error connecting:Timeout expired. The tumeout period
elapsed prior to obtaining a connection from the pool.
this may have occurred because all pooled connections were in use and max pool size
研究了下,好像是说数据库中查询的异常。
是不是因为数据库打开后,一直在操作,并没有关闭而导致的问题呢??小弟不敢确定,枉大家解答。谢谢
....con.Close();//释放连接回连接池或者using(SqlConnection con = new SqlConnection())
{
....
}//自动释放连接回连接池