Using Recordsets ASP / VBScript

by Nathan 29. March 2009 08:45

 

If you receive this error 

ADODB.Recordset error '800a0e78'

Operation is not allowed when the object is closed.

you will need to check the state of the recordset as in the code below before you access any properties of the object

 


if not oRs.state <> 1 then

        if not oRs.eof then

              if oRs("Value").Value > 0 then
                 myval = oRs("Value").Value
            else
           myval = 0     
            end if
        end if
    else
        Response.Write "Cannot find any records"
    end if
   

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

ASP

Comments

Add comment


(Will show your Gravatar icon)  

  Country flag

biuquote
  • Comment
  • Preview
Loading



Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

About the author

I am a Website Developer and Designer based in Sydney, Australia. I have experience in developing websites and applications using various languages including C#, VB, C++, Flash (ActionScript), SQL and Linux. You can see some of my projects at www.nathanbaker.com.au

Page List