OracleConnection con2n = new OracleConnection(oraDS);
OracleCommand command = new OracleCommand();
command.Connection = con2n;
con2n.Open(); //这里没有关闭
con2n = new OracleConnection(oraDS);
command = new OracleCommand();
command.Connection = con2n;
con2n.Open();
会导致超时;因为连接没关闭,又新建连接,然后会把连接池塞满,达到数据库设定的最大值,然后超时
报错的异常不能看吗?
没有报错,表面是运行正常的!
资源是有限制的,你一直不关一直新建,当时没问题,。时间积累后就会出错了