[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 502
  • Last Modified:

IE8 Recordset problem: Operation is not allowed when the object is closed.

I have recently upgraded my IE browser to IE8 and now my ASP app is not working.  Before upgrading my code worked fine, but now, when I try to open one of the ASP pages, I get the error message above:  Operation is not allowed when the object is closed.
I have an include file that opens the db connection then, within each page, I open a recordset using a query string:  rsID = objConn.Execute(sSql).  Listed below is the code I'm using.  The error occurs on the last line of this code: set rsIds = objConn.Execute(idSql)
Could someone please help me out here?  This is getting very frustrating.

Chris
In my include file:
    Dim objConn, strConnect
    Set objConn = Server.CreateObject("ADODB.Connection")
    strConnect = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("/RadioRoom/csrrsql.mdb")
    objConn.ConnectionString = strConnect
 
Code in asp page:
    Dim winOpen, width, height, title, fileName, sClass, id
    Dim idSql, rsIds
    
    winOpen = Request.QueryString("win")
    set rsIds = Server.CreateObject("ADODB.recordset")
    Select Case (UCase(winOpen))
        case "SII":
            title="Ship Identification"
            width=550
            height=250
            fileName="shipId.asp"
            idSql = "SELECT dbo_tblHull.HullID as ID FROM dbo_tblHull INNER JOIN dbo_tblClass ON dbo_tblHull.classID = dbo_tblClass.classID ORDER BY dbo_tblHull.HullID;"
        case "SC":
            title="Security Classification"
            width=450
            height=75
            fileName="secClass.asp"
            idSql = "SELECT classID as ID FROM dbo_tblClasificaton"
        case "SL":
            title = "Subsystems"
            width=450
            height=120
            fileName="subSys.asp"
            idSql = "SELECT sybSysId as ID FROM dbo_tblSubSystem"
        case "SR":
            title = "Stowage Requirements"
            width=480
            height=150
            fileName="stowReq.asp"
            idSql = "SELECT stowageID as ID FROM dbo_tblStowage"
        case "PSC":
            title = "Provisioning Source Codes"
            width=280
            height=150
            fileName="provSrc.asp"
            idSql = "SELECT sourceID as ID FROM dbo_tblSource"
    end select
    set rsIds = objConn.Execute(idSql)

Open in new window

0
chrscote
Asked:
chrscote
  • 3
1 Solution
 
CCongdonCommented:
I don't see an objConn.Open() command.
Are you sure it was just the browser upgrade that upset this program? Seems to me it wouldn't have worked anyway.
0
 
chrscoteAuthor Commented:
Oops, I just forgot to add it into the message.  I do have objConn.Open() after the connectionString line.
0
 
CCongdonCommented:
that is odd. One thing, how about removing
set rsIds = Server.CreateObject("ADODB.recordset")
That's actually a redundant line anyways. I don't think it'll make a difference in this case...
Are you sure the QueryString is being passed? Have you considered an Else for your Case statement?
0
 
DanielcmorrisCommented:
just as a test, replace:

set rsIds = objConn.Execute(idSql)

with rsIds.open(idSsql), -then type in your connection string directly


If that works, then maybe you can work back from there.
0
 
CCongdonCommented:
However removing the line I suggested and adding the line Danialcmorris suggested are mutually exclusive.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now