'800a0e79' Operation is not allowed when the object is open

Discussion in 'ASP General' started by middletree, Dec 15, 2005.

  1. middletree

    middletree Guest

    I'm having a hard time finding out why I'm getting this error. Seems to work
    just fine on another site I built. I went to ASPFAQ.com, Microsoft.com, and
    some other sites. Have not been able to spot the problem yet.

    Very simple code:

    First, the connection:
    strConnection ="Provider=Microsoft.Jet.OLEDB.4.0;Data
    Source="&server.mappath(".\**.mdb")&";User Id=***;Password=***;"
    filePath = Server.MapPath("***.mdb")

    Next, the code, which queries one table in an Access database, and pulls a
    city, state, name, and phone number, all of which are of type Memo:


    <% Set objConnection = Server.CreateObject("ADODB.Connection")
    objConnection.ConnectionString = strConnection
    objConnection.Open

    strSQL = "select State, City, BranchID, Phone, BranchName from CMMain "

    set RS = objConnection.execute (strSQL)
    RS.Open strSQL, objConnection,1,1

    If Not RS.EOF Then
    Do While not rs.EOF
    strState = rs("State")
    strCity = rs("City")
    strBranchID = rs("BranchID")
    strPhone = rs("Phone")
    strBranchName = rs("BranchName")
    %>
    <tr>
    <td>
    <%=strBranchName%>
    </td>
    <td>
    <%=strCity%>
    </td>
    <td>
    <%=strState%>
    </td>
    <td>
    <%=strPhone%>
    </td>
    </tr>
    <%Response.Clear()
    Loop
    End if
    set rs = nothing
    set ObjConnection = nothing
    %>
     
    middletree, Dec 15, 2005
    #1
    1. Advertising

  2. middletree

    middletree Guest

    Got past it.

    this was redundant, so I got rid of the second line:

    > set RS = objConnection.execute (strSQL)
    > RS.Open strSQL, objConnection,1,1
     
    middletree, Dec 15, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    2,113
    Kevin Spencer
    Aug 10, 2005
  2. Matthew Louden
    Replies:
    6
    Views:
    247
    Ken Schaefer
    Sep 28, 2003
  3. cliverama
    Replies:
    1
    Views:
    132
    Aaron Bertrand [MVP]
    Nov 5, 2003
  4. Guest
    Replies:
    1
    Views:
    231
    Ray Costanzo [MVP]
    Dec 20, 2004
  5. ADZ Media

    ASP Problem 800a0e79

    ADZ Media, Feb 7, 2007, in forum: ASP General
    Replies:
    2
    Views:
    198
    Roland Hall
    Feb 12, 2007
Loading...

Share This Page