View Single Post
Old 07-02-2008, 16:25   #1 (permalink)
simonruk1
Dyslexic! Are You?
 
Join Date: Jan 2007
Location: Warrington
Posts: 57
ADODB.Connection error '800a0e78'

Hi I am new to ASP and I am getting this error:

ADODB.Connection error '800a0e78'

Operation is not allowed when the object is closed.

/members/asp/util.asp, line 67


the code line in the util.asp looks like this:

Sub CreateVisitorID(dcnDB)

Dim rsData
Dim strSQL

If Request.Cookies("VisitorID") <> "" Then Exit Sub

strSQL = "INSERT INTO Visitors " & "(VisitDate, Host) " & "VALUES (" & "#" & Date & " " & Time & "#, " & "'"

If Request.ServerVariables("REMOTE_HOST") <> "" Then
strSQL = strSQL & Request.ServerVariables("REMOTE_HOST")
Else
strSQL = strSQL & Request.ServerVariables("REMOTE_ADDR")
End IF

strSQL = strSQL & "')"

Application.Lock
dcnDB.Execute strSQL (this is line 67)
strSQL = "SELECT Max(VisitorID) FROM Visitors"
Set rsData = dcnDB.Execute(strSQL)
Response.Cookies("VisitorID") = rsData(0)
Application.Unlock

rsData.Close

End Sub


Can any one please help
  Reply With Quote