Hi
If I use an standard ASP page
<%
Response.Write "Creating Connection Object" & "<br />"
Set CNN = Server.CreateObject("ADODB.Connection")
Response.Write "Open Connection" & "<br />"
CNN.Open "books.udd"
Response.Write "Close Connection" & "<br />"
CNN.Close
Response.Write CNN.State & "<br />"
Response.Write "Set CNN instance to nothing" & "<br />"
Set CNN = Nothing
%>
I notice that even after I issue
Connection.Close
Set Connection = Nothing
the "active connection" persists for roughly 60 seconds (this seems to be some kind of IIS default as my client driver has no configurable setting for CP).
However, if I use a
VB.NET ASP page that mirrors the same logic
<%@ Page Language="
VB" Debug="True" CompilerOptions='/R:"C:\Program Files\Microsoft.NET\Odbc.Net\Microsoft.data.odbc.d ll"'%>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace = "Microsoft.Data.Odbc" %>
<script language="
vb" runat="server">
Sub Page_Load()
Dim cn as OdbcConnection
cn = New OdbcConnection ("dsn=books.udd;uid=;pwd=;")
try
Cn.Open()
con_open.text="Connection Open successfully.<br />"
Cn.Close()
con_close.text="Connection Closed successfully.<br />"
catch e as exception
con_open.text="Connection failed to open.<br />"
con_close.text = e.ToString()
end try
end Sub
</script>
the connection is cleaned up straight off.
Why does this difference manifest itself?
Tony