Re: VBscript Error 800a01a8 on Connection.Close

From: Peter Gruendler (usenetspam_at_fahr-zur-hoelle.org)
Date: 06/25/04


Date: Fri, 25 Jun 2004 07:48:55 +0200

Am Thu, 24 Jun 2004 21:49:23 -0400 schrieb Val Mazur:

Hi Val,
> What is your current code? Do you have other recordsets opened against this
> connection?

Thanks, the cause for the problem (Connection.Mode=adModeShareExclusive)
has been resolved on the server.

Just in case you're still interested, her is the relevant part of the
file with comments and unrelated parts (mostly HTML) removed:

regards, Peter

=====================
<% Option Explicit
   response.Buffer = true %>
<!--#include file="../_private/common.asp"-->
<!--#include file="../_private/functions.asp"-->

<%
ldConn = OpenLitDB(ldConn)
if ldConn <> -1 then
if CheckAdminUser() = false then response.redirect("login.asp")

ShowSteps ZitBearbeitenSteps, 2

Session("CurrentZitKey") = Request.Form("zitselect")
sql = "SELECT * FROM ldZitat WHERE zitKey=" & Session("CurrentZitKey")
if tracing then response.write("SQL: #" & sql & "#<br>")

Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, ldConn, 3, 3
if rs.recordcount > 0 then

Session("zjournalk") = rs.Fields("zitJournal")
Session("zVolume") = rs.Fields("zitVolume")
Session("zJahr") = rs.Fields("zitJahr")
Session("zSeiten") = rs.Fields("zitSeiten")
Session("zAutoren") = rs.Fields("zitAutoren")
Session("zTitel") = rs.Fields("zitTitel")
Session("zKeywords") = rs.Fields("zitKeywords")

rs.Close
set rs = nothing
ldConn.Close '<============================================== HERE!
ldConn = OpenLitDB(ldConn)

sql2 = "select k2.kat2Name, k1.kat1Name, zk.zkKey from ldKategorie2 k2,
ldKategorie1 k1, ldZitKat zk where k1.kat1Key=k2.kat2Kat1 and
k2.kat2Key=zk.zkKat2 and zk.zkZit=" & Session("CurrentZitKey")

if tracing then response.write("SQLc: #" & sql2 & "#<br>")

Set rsc = Server.CreateObject("ADODB.Recordset")
rsc.Open sql2, ldConn, 3, 3
Session("numkats") = rsc.recordcount
...
...