M
Microsoft
I have been going through some tutorials on using the new dataset designer
in Visual Studio 2005 to build dataadapters which include inserts, updates,
and deletes...so I don't have to code it all by hand. This tutorial is
tutorial #1 located here
http://www.asp.net/learn/dataaccess/default.aspx?tabid=63.
When I call my dataadapter insert statement, and my insert is invalid (e.g.
wrong permissions on my database or trying to insert null value into column
that requires value input), I am able to log the exception that is thrown,
but my database then 'chokes' because it seems the connection did not get
closed properly. The databsae thinks it still has a connection to it.
Since I have not hand coded the connection, I don't know how to close it
when an exception is thrown (I don't think have access to the connection
object). Normally I would close a connection in my finally statement.
Please advise. Thanks.
in Visual Studio 2005 to build dataadapters which include inserts, updates,
and deletes...so I don't have to code it all by hand. This tutorial is
tutorial #1 located here
http://www.asp.net/learn/dataaccess/default.aspx?tabid=63.
When I call my dataadapter insert statement, and my insert is invalid (e.g.
wrong permissions on my database or trying to insert null value into column
that requires value input), I am able to log the exception that is thrown,
but my database then 'chokes' because it seems the connection did not get
closed properly. The databsae thinks it still has a connection to it.
Since I have not hand coded the connection, I don't know how to close it
when an exception is thrown (I don't think have access to the connection
object). Normally I would close a connection in my finally statement.
Please advise. Thanks.