T
Theodor Ramisch
Hi NG,
i have a ASP.Net application and an Oracle 9i database. I use the
System.Data.OracleClient library to connect. I set the
Max Pool Size property to 2 and watched the opened connections which
increased after the application start to 2. The problem is that the
first connection is used to query all statements and the second
connection stops after the usage of an OracleDataAdapter. The status
of the second connection is INACTIVE, but no other query will use it.
After a while when the first connection is busy, i get the following
error:
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.
But the second connection is still "INACTIVE" and the
"Current Statement" value is still the query of the DataAdapter I used
at the beginning:
string SQL="SELECT * FROM bla ORDER BY myName -- " +
DateTime.Now.ToLongTimeString();
using(OracleCommand Query = new OracleCommand(SQL,_Conn)) {
_Adapter=new OracleDataAdapter(Query);
_Cb=new OracleCommandBuilder(_Adapter);
if(_Users.Tables["bla"]!=null) _Users.Tables["bla"].Clear();
_Adapter.Fill(_Users,"bla");
_View=_Users.Tables["bla"].DefaultView;
}
_Conn is a property of my class, I dont't call .Open or .Close beacause
the OracleDataAdapter should do that. But why isn't the connection
reused?
Regards,
Theodor Ramisch
i have a ASP.Net application and an Oracle 9i database. I use the
System.Data.OracleClient library to connect. I set the
Max Pool Size property to 2 and watched the opened connections which
increased after the application start to 2. The problem is that the
first connection is used to query all statements and the second
connection stops after the usage of an OracleDataAdapter. The status
of the second connection is INACTIVE, but no other query will use it.
After a while when the first connection is busy, i get the following
error:
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.
But the second connection is still "INACTIVE" and the
"Current Statement" value is still the query of the DataAdapter I used
at the beginning:
string SQL="SELECT * FROM bla ORDER BY myName -- " +
DateTime.Now.ToLongTimeString();
using(OracleCommand Query = new OracleCommand(SQL,_Conn)) {
_Adapter=new OracleDataAdapter(Query);
_Cb=new OracleCommandBuilder(_Adapter);
if(_Users.Tables["bla"]!=null) _Users.Tables["bla"].Clear();
_Adapter.Fill(_Users,"bla");
_View=_Users.Tables["bla"].DefaultView;
}
_Conn is a property of my class, I dont't call .Open or .Close beacause
the OracleDataAdapter should do that. But why isn't the connection
reused?
Regards,
Theodor Ramisch