[Mono-devel-list] Possible bug when using OracleConnection class

Jim Hurst gherkin25 at yahoo.co.uk
Wed Jun 23 06:29:14 EDT 2004

I'm been having a problem when using the
OracleConnection class.  The code I'm trying to get
working uses the 'using' keyword to dispose of the
connection when it is finished with. The code below
was used as a test and when run 10 times the
connections where only released when the application
was closed, not when the PerformSelectionUsing method
went out of scope.  

private void PerformSelectionUsing(String strSQL)
    String strConnectionString;

    strConnectionString = 
        "data source=ora9r2;" +
        "user id=jh_test3;password=jh_test3;";

    using(IDbConnection conn = OpenConnectionOracle(
        System.Console.Out.WriteLine("Using Test!");

private IDbConnection OpenConnectionOracle(String 
    IDbConnection cnxn;
    cnxn = new OracleConnection(strConnectionString);
    return cnxn;

If the code is run more than 10-20 times the code will
lock and the server will stop responding.
I've also tried the following code and it cause the
same problem:

cnxn = OpenConnectionOracle(strConnectionString);


I've looked in the source code for the
OracleConnection class and the 'dispose()' method does
not seam to close any open connections, I was
wondering if this was correct.  I have also looked at
the TestOracleClient class and this does not use using
or dispose either.

The code I am trying to get working is from a set of
web services that was originally developed on Windows
using Microsofts .NET environment and it works fine

I'm using:
SUSE Linux 9.0 (x86)
Mono Beta 3
Oracle 10G Instant Client connecting to Oracle 9i

Thanks in advance.

___________________________________________________________ALL-NEW Yahoo! Messenger - sooooo many all-new ways to express yourself http://uk.messenger.yahoo.com

More information about the Mono-devel-list mailing list