troubleshooting Question

ADODB.Recordset error '800a0e78' - Operation is not allowed when the object is closed.

Avatar of garethtnash
garethtnashFlag for United Kingdom of Great Britain and Northern Ireland asked on
Visual Basic ClassicASPVB Script
6 Comments1 Solution2863 ViewsLast Modified:
Hello,

I have an ASP VBScript web page that calls an MS SQL Stored Procedure, which queries the database..

When I test for values that I know don't exist I get --


ADODB.Recordset error '800a0e78'
Operation is not allowed when the object is closed.
/test23.asp, line 20

Where line 20 is --

if not RSContacts.eof then

Of -

<%
if(Request("search") <> "") then

Dim CMDContactSearch__search
CMDContactSearch__search = NULL
if(Request("search") <> "") then CMDContactSearch__search = Request("search")

set CMDContactSearch = Server.CreateObject("ADODB.Command")
CMDContactSearch.ActiveConnection = MM_GolfConnection_STRING
CMDContactSearch.CommandText = "dbo.ContactSearchv2"
CMDContactSearch.CommandType = 4
CMDContactSearch.CommandTimeout = 0
CMDContactSearch.Prepared = true
CMDContactSearch.Parameters.Append CMDContactSearch.CreateParameter("@RETURN_VALUE", 3, 4)
CMDContactSearch.Parameters.Append CMDContactSearch.CreateParameter("@search", 200, 1,500,CMDContactSearch__search)
set RSContacts = CMDContactSearch.Execute
RSContacts_numRows = 0

if not RSContacts.eof then
Dim ARRContacts
ARRContacts = RSContacts.GetRows()

RSContacts.Close()
Set RSContacts = Nothing

End if
End if
%>

I've tried changing the if statement to

if IsObject(RSContacts) then

but that just moves the problem --

ADODB.Recordset error '800a0e78'
Operation is not allowed when the object is closed.
/test23.asp, line 22

Line 22 is

ARRContacts = RSContacts.GetRows()

Help !!

What is the best route here?

Thanks
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 6 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros