D
David Lozzi
Howdy,
I ran into a very interesting issue and I'm curios as to how this is suppose
to work. I am using Try...Catch...Finally statements for all database
connectivity in my ASP.NET 2.0 web application. I'm connecting to IBM's
Universe 10.2 using UniObjects.Net. Anyway, if the connection errors, the
Finally closes the connection. What I see happening is that the function in
the Finally statement either isn't running or doesn't apply what its suppose
to.
For example. Running Visual Studio 2005, I debug my web app and step through
a function that I am purposly erroring on. The session opens, then a command
errors out. In the Catch I am taking the ex.tostring and sending it to a
class function that I then email that to myself and then send the user to a
default error page using server.transfer("page",false). After that function
runs, the debugger sends me back to the calling function, finishes the Catch
then fires the Finally, which closes the session.
So my problem is that it appears that the database session is not closing in
the finally. I just moved the close session to the first line in the Catch
and it appears to close it properly...
Thanks!!
David Lozzi
I ran into a very interesting issue and I'm curios as to how this is suppose
to work. I am using Try...Catch...Finally statements for all database
connectivity in my ASP.NET 2.0 web application. I'm connecting to IBM's
Universe 10.2 using UniObjects.Net. Anyway, if the connection errors, the
Finally closes the connection. What I see happening is that the function in
the Finally statement either isn't running or doesn't apply what its suppose
to.
For example. Running Visual Studio 2005, I debug my web app and step through
a function that I am purposly erroring on. The session opens, then a command
errors out. In the Catch I am taking the ex.tostring and sending it to a
class function that I then email that to myself and then send the user to a
default error page using server.transfer("page",false). After that function
runs, the debugger sends me back to the calling function, finishes the Catch
then fires the Finally, which closes the session.
So my problem is that it appears that the database session is not closing in
the finally. I just moved the close session to the first line in the Catch
and it appears to close it properly...
Thanks!!
David Lozzi