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
ASPVB ScriptVisual Basic Classic
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

Open in new window


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
%>

Open in new window


I've tried changing the if statement to

if IsObject(RSContacts) then

Open in new window


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()

Open in new window


Help !!

What is the best route here?

Thanks
ASKER CERTIFIED SOLUTION
Meir Rivkin
Full stack Software Engineer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
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