c#代码如下
DbConnection connection = providerFactory.CreateConnection();
DbCommand command = providerFactory.CreateCommand();
connection.ConnectionString = ConnectionString;
command.CommandText = sql;
command.CommandType = commandType;
command.Connection = connection;
try
{
command.Connection.Open();
using (DbDataReader reader = command.ExecuteReader())//这里报异常
{.....此处省略.....}
}catch(Exception ex){....}
finally
{
try { if (command.Connection != null)command.Connection.Close(); }
catch (Exception) { }
}
oracle在本地连接一直没有问题,后来因oracle太卡,所以弄了远程的服务器(无线路由)结果经常大约在3分钟左右不进行数据库操作的话,就会产生异常ORA-a03113: end-of-file on communication channel,
注意:是异常,而不是重连造成的慢,实在是让人郁闷.
并且在刷新一到两次后则会成功连接,并可操作数据库
DbConnection connection = providerFactory.CreateConnection();
DbCommand command = providerFactory.CreateCommand();
connection.ConnectionString = ConnectionString;
command.CommandText = sql;
command.CommandType = commandType;
command.Connection = connection;
try
{
command.Connection.Open();
using (DbDataReader reader = command.ExecuteReader())//这里报异常
{.....此处省略.....}
}catch(Exception ex){....}
finally
{
try { if (command.Connection != null)command.Connection.Close(); }
catch (Exception) { }
}
oracle在本地连接一直没有问题,后来因oracle太卡,所以弄了远程的服务器(无线路由)结果经常大约在3分钟左右不进行数据库操作的话,就会产生异常ORA-a03113: end-of-file on communication channel,
注意:是异常,而不是重连造成的慢,实在是让人郁闷.
并且在刷新一到两次后则会成功连接,并可操作数据库
您好,这是我遇到的异常,请问您知道解决方法吗? 能提供下您QQ吗,我QQ 805228422谢谢您了