P
Peter K
Hi - is it the case that OracleConnection does not call close when the
connection is disposed?
For example, I use this sort of construct:
using (OracleConnection conn = GetConnection())
{
using (OracleTransaction tx = conn.BeginTransaction())
{
using (OracleCommand command = conn.CreateCommand())
etc.
But now a colleague tells me that the connection is not closed when the
using clause ends. Can this be true? Is that not a serious bug in
OracleConnection?
Or could it be affected by the "GetConnection" method which is a call to a
third-party class which actually gives us a connection - I mean, could
GetConnection somehow affect the subsequent "dispose" behaviour of the
connection?
Thanks,
Peter
connection is disposed?
For example, I use this sort of construct:
using (OracleConnection conn = GetConnection())
{
using (OracleTransaction tx = conn.BeginTransaction())
{
using (OracleCommand command = conn.CreateCommand())
etc.
But now a colleague tells me that the connection is not closed when the
using clause ends. Can this be true? Is that not a serious bug in
OracleConnection?
Or could it be affected by the "GetConnection" method which is a call to a
third-party class which actually gives us a connection - I mean, could
GetConnection somehow affect the subsequent "dispose" behaviour of the
connection?
Thanks,
Peter