CFF KB - Carrz-Fox-Fire Promotions Knowledge Base

CFF KB is all about 1 thing: The Sharing of Knowledge and the Power we gain from it.
  • Breadrumbs:
  • ADODB.Recordset error '800a0e78' Operation is not allowed when the object is closed

  • CFF Knowledge Base - Share With Facebook CFF Knowledge Base - Share on Twitter CFF Knowledge Base - Share on Reddit CFF Knowledge Base - Share on Digg It CFF Knowledge Base - Share on Stumble Upon It CFF Knowledge Base - Share on Delicious
    Share With Friends (Updated 6-8-2010)
  • Article ID:
    119
  • Date Created
    Sunday, March 13, 2011
  • This Article Has been Viewed
    2613 times
  • Short Desc
    When you close your RecordSet connection prematurely and need to continue using the RecordSet, you will experiance this error.
  • Details
    When you create your RecordSet you have to also destroy it, and this is done by simply calling the recordset.close.
    Example:
    rs.close
    Now, if you need to use the RecordSet again after you have closed it, you will experiance the following error IF the RecordSet if called after the rs.close if called.

     
    ADODB.Recordset error '800a0e78'
    Operation is not allowed when the object is closed.
    /Reported.asp, line 19
  • Recreate Issue
    To recreate this issue:

    This creates the recordset in a Parameter
     
    set rs = sql.execute
    rs.close
    repsonse.write rs("RecordName")


    The above will give you the error, reason: The rs("RecordName") us used after the rs.close is initiated.
  • Resolve Issue
    To Resolve this issue:

     
    set rs = sql.execute
    repsonse.write rs("RecordName")
    rs.close


    As you can see in the above example, we are closing the RecordSet rs after we have finished using it.