日期:2014-05-19  浏览次数:20737 次

Excle数据导入oracle出错,数据只有2千多条,在线等救命呀。
rt:试过几百条数据就没事,2千多条就出现下面的错误,帮帮忙。。


System.InvalidOperationException:   Timeout   expired.   The   timeout   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   was   reached.   at   System.Data.OracleClient.OracleConnectionPoolManager.GetPooledConnection(String   encryptedConnectionString,   OracleConnectionString   options,   OracleConnection   owningObject,   Boolean&   isInTransaction)   at   System.Data.OracleClient.OracleConnection.OpenInternal(OracleConnectionString   parsedConnectionString,   Object   transact)   at   System.Data.OracleClient.OracleConnection.Open()   at   LoadExcel.DataAccessCenter..ctor(String   connectionString)   in   C:\Inetpub\wwwroot\LoadExcel\Class\DataAccessCenter.cs:line   51   at   LoadExcel.DataAccessCenter..ctor()   in   C:\Inetpub\wwwroot\LoadExcel\Class\DataAccessCenter.cs:line   37   at   LoadExcel.WebForm._default.btnLoadExcel_Click(Object   sender,   EventArgs   e)   in   c:\inetpub\wwwroot\loadexcel\webform\default.aspx.cs:line   116


------解决方案--------------------
这个错误 很有可能是因为反复开新连接 而从来不关闭造成的
好好检查下代码
------解决方案--------------------
偶5千条以上,方法是先倒入到datagrid中,然后一条一条进去,很快的啊
------解决方案--------------------
在DataGrid裡導出去快多了