3 Replies Latest reply on Sep 16, 2009 1:13 AM by mlov83

    VB6, OO4O and connection pooling

      I am just trying to understand how connection pooling works. My problem is that there is a process that is spawning hundreds (999) of connections to the database and I am not sure if it is my process or some other process.

      My code closes all connections I create/open using the OraDatabase.RemoveFromPool call, however, I have my application print out the number of connections using OraSession.DbPoolCurrentSize and it starts to increase as time passes by.

      I can't figure out why the poolcurrentsize would increase with time. As I said, I am trying to understand how the connection pool works, so any and all information will be appreciated. Thank you in advance for your time.
        • 1. Re: VB6, OO4O and connection pooling
          I have pinpointed the problem to the fact that when I make a call to a stored procedure and the stored proc raises an exception (data not found), my createSQL statement also raises an error (as I want it to).

          However, the VB error handling code contains a call to OraDatabase.RemoveFromPool that does not work. It gets executed, but pool current size is not decremented as it should be. Again, any information is appreciated. Thanks.
          • 2. Re: VB6, OO4O and connection pooling
            Unfortunately, no one replied to my post :-(, but I did solve the problem and I am posting the solution in case someone else faces the same problem.

            I wrapped the code where I get a connection in a subroutine. In that subroutine, I first check if there is an active connection already and if so, I just exit. If not, I get/open a connection. Thanks.
            • 3. Re: VB6, OO4O and connection pooling
              I realize that this is an old post and i hope you get this message. how do you check for an open connection in your subroutine im having the same problem...