我有两个并发连接,它们一个接一个地执行。我已经单独尝试了它们并且两者似乎都运行得很完美..但是当它们一起运行时(一个接一个地像下面的示例),它会抛出一个对象引用错误..这是连接池的可能问题cos吗?
OracleConnection conn = new OracleConnection (ConnectionString1))
OracleCommand cmd = new OracleCommand("proc1", conn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.parameters.add("param1", OracleDbType.Varchar2 , 20 , ParameterDirection.Input);
conn.Open();
cmd.ExecuteReader();
conn.close()
OracleConnection conn2 = new OracleConnection (ConnectionString2))
OracleCommand cmd2 = new OracleCommand("proc2", conn2);
cmd2.CommandType = CommandType.StoredProcedure;
//Exception raised in the next line
cmd2.parameters.add("param1", OracleDbType.Varchar2 , 20 , ParameterDirection.Input);
conn2.Open();
cmd2.ExecuteReader();
conn2.close();