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

Posted on 2009-04-30
Last Modified: 2012-06-27
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.

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"




            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"




            idSql = "SELECT classID as ID FROM dbo_tblClasificaton"

        case "SL":

            title = "Subsystems"




            idSql = "SELECT sybSysId as ID FROM dbo_tblSubSystem"

        case "SR":

            title = "Stowage Requirements"




            idSql = "SELECT stowageID as ID FROM dbo_tblStowage"

        case "PSC":

            title = "Provisioning Source Codes"




            idSql = "SELECT sourceID as ID FROM dbo_tblSource"

    end select

    set rsIds = objConn.Execute(idSql)

Open in new window

Question by:chrscote
    LVL 9

    Expert Comment

    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.

    Author Comment

    Oops, I just forgot to add it into the message.  I do have objConn.Open() after the connectionString line.
    LVL 9

    Expert Comment

    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?
    LVL 4

    Accepted Solution

    just as a test, replace:

    set rsIds = objConn.Execute(idSql)

    with, -then type in your connection string directly

    If that works, then maybe you can work back from there.
    LVL 9

    Expert Comment

    However removing the line I suggested and adding the line Danialcmorris suggested are mutually exclusive.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
    I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now