A
Andy G
I have some code that hits a DB2 database from my ASP.NET application. I
haven't been able to exactly nail it down but my connections are not getting
closed for some reason. I look at the database and it's like everytime I
click a button in the ASP.NET applicaiton and it runs a database command it
leaves the connection open. The DBA's are not happy with me right now.
Luckily I'm still in test. Does anyone have any idea why the below code is
not closing the connection to the database correctly. Or maybe it has
something to do with the version of DB2, CAE, or I need to add a IMB DB2
reference to my project. Any help will be help.
Thanks.
Andy
Dim DataConn As ADODB.Connection
DataConn = New ADODB.Connection DataConn.ConnectionTimeout =
Session("DataConn_ConnectionTimeout") DataConn.CommandTimeout =
Session("DataConn_CommandTimeout")
DataConn.Open(Session("DataConn_ConnectionString"),
Session("DataConn_RuntimeUserName"), Session("DataConn_RuntimePassword"))
rs = New ADODB.Recordset
rs.Open("Select distinct(camp_id)" & " from atlt.camps_web_camp where
camp_id >=' '" & " Order by camp_id asc", DataConn, 1, 3)
DataConn.close( )
haven't been able to exactly nail it down but my connections are not getting
closed for some reason. I look at the database and it's like everytime I
click a button in the ASP.NET applicaiton and it runs a database command it
leaves the connection open. The DBA's are not happy with me right now.
Luckily I'm still in test. Does anyone have any idea why the below code is
not closing the connection to the database correctly. Or maybe it has
something to do with the version of DB2, CAE, or I need to add a IMB DB2
reference to my project. Any help will be help.
Thanks.
Andy
Dim DataConn As ADODB.Connection
DataConn = New ADODB.Connection DataConn.ConnectionTimeout =
Session("DataConn_ConnectionTimeout") DataConn.CommandTimeout =
Session("DataConn_CommandTimeout")
DataConn.Open(Session("DataConn_ConnectionString"),
Session("DataConn_RuntimeUserName"), Session("DataConn_RuntimePassword"))
rs = New ADODB.Recordset
rs.Open("Select distinct(camp_id)" & " from atlt.camps_web_camp where
camp_id >=' '" & " Order by camp_id asc", DataConn, 1, 3)
DataConn.close( )