Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADODB.Connection error '800a0e78' Operation is not allowed when the

Status
Not open for further replies.

lud4352

Technical User
Mar 10, 2011
4
US
Object is closed. /display.asp, line 14

Please help


<%
'Response.Expires = 0
'Response.AddHeader "pragma", "no-cache"
Response.Buffer = True
Session.Timeout = 120

Dim strPageName

If Left(Request.ServerVariables("CONTENT_TYPE"), 9) = "multipart" Then
Dim objUpload
Set objUpload = Server.CreateObject("ADODB.Connection")

objUpload.SaveToMemory()

strPageName = objUpload.Form("hdnPage")
Set Session("ASPUpload") = objUpload
Session("Mode") = 1
Else
strPageName = Request.QueryString("page")
Session("Mode") = 0
End If

If Trim(strPageName) = "" Then
strPageName = "HOME"
End If

Dim objSettings
objSettings = GetSettings (Server.MapPath ("config/site.xml"), strPageName)

If IsEmpty(objSettings) Then
Response.Redirect "hp.asp?page=HOME"
Response.End
End If


Dim strXmlPath
Dim strXslPath
Dim strAspPath
Dim strRestrictedTo

Dim oPage

strXmlPath = objSettings(0)
strXslPath = objSettings(1)
strAspPath = objSettings(2)
strRestrictedTo = objSettings(3)
Session("Connection") = objSettings(4)

Select Case strRestrictedTo
Case "ADMIN", "*"
If CInt(Session("UserID")) < 1 Then
Session("RedirectUrl") = Request.QueryString
Response.Redirect "hp.asp?page=LOGIN"
Response.End
End If

If (strRestrictedTo = "ADMIN") And (Session("IsAdmin") <> 1) Then
Response.Redirect "hp.asp?page=HOME"
Response.End
End If
End Select

Set oPage = LoadPage(strXmlPath)

If Session("IsAdmin") = 1 Then
oPage.DocumentElement.SetAttribute "is-admin","1"
End If
If CInt(Session("UserID")) < 1 Then
oPage.DocumentElement.SetAttribute "is-logged","0"
Else
oPage.DocumentElement.SetAttribute "is-logged","1"
End If


oPage.DocumentElement.SetAttribute "root", strRoot
oPage.DocumentElement.SetAttribute "httpsroot", strHTTPSRoot

If Left(Request.ServerVariables("HTTP_USER_AGENT"),11) = "Mozilla/4.7" Or Left(Request.ServerVariables("HTTP_USER_AGENT"),11) = "Mozilla/4.8" Then
oPage.DocumentElement.SetAttribute "netscape", "1"
Else
oPage.DocumentElement.SetAttribute "netscape", "0"
End If

StartSession

ApplyHeader(oPage)

ApplySideBar oPage, strPageName

ProcessMappings(oPage)

If strAspPath <> "" Then
Set Session("oPage") = oPage
Server.Execute strAspPath
Set Session("oPage") = Nothing
End If

%>
 
open the object first

-Geates

"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."
- Martin Golding

"There are seldom good technological solutions to behavioral problems."
- Ed Crowley, Exchange guru and technology curmudgeon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top