garethtnash
asked on
ADODB.Recordset error '800a0e78' - Operation is not allowed when the object is closed.
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 --
Where line 20 is --
Of -
I've tried changing the if statement to
but that just moves the problem --
Line 22 is
Help !!
What is the best route here?
Thanks
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
ASKER
Hi Sedgwick,
That gave me --
Any thoughts?
That gave me --
Microsoft VBScript runtime error '800a01a8'
Object required: 'ConContactSearchCMDContactSearch'
/test23.asp, line 12
Any thoughts?
can u post the whole code again?
ASKER
Sure ,
I've added a section of code (commented out), which if you remove the offending section and run results in 'Object Exists' being written to the page --
I guess this means that the object exists.... Even though the recordset is empty
Appreciate your help..
thanks
I've added a section of code (commented out), which if you remove the offending section and run results in 'Object Exists' being written to the page --
<%
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 IsObject(RSContacts) then
'Dim resp
'resp = "Object Exists"
'End if
if not RSContacts.eof then
Dim ARRContacts
ARRContacts = RSContacts.GetRows()
RSContacts.Close()
Set RSContacts = Nothing
End if
End if
%>
I guess this means that the object exists.... Even though the recordset is empty
Appreciate your help..
thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Sedgwick
replace this lines:
Open in new window
with this lines:Open in new window