Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 4th, 2011, 06:21 AM
Registered User
 
Join Date: Nov 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation Operation is not allowed when the object is closed.

I am working in classic asp with vbscript.
I am looking for a solution for an error for long time.So i ll post my query.
In my ASP page , I am populating a record set from SQL SERVER stored procedure.
As soon as the record set is populating , i am checking whether it is null or not.
For that , I added


If (RSDataset.EOF) Then
Response.Write("RecordSet in empty")
Else
Response.Write("Record(s) are in the RecordSet")
End If
Response.End

When the stored procedure returning data it display 'Record(s) are in the RecordSet'.
When the stored procedure not returning data(ie no rows) it display 'RecordSet in empty'


But for some cases it is displaying the error



ADODB.Recordset error '800a0e78'

Operation is not allowed when the object is closed.

DataCheckPage.asp, line 35

By googling I came to no that , adding SET NO COUNT ON is a solution.That I already added.
An the Connection is not closed, as I checked that also.

Can anyone help me out to resolve this ?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Operation is not allowed when the object is closed. adamhw Classic ASP Basics 5 June 4th, 2010 05:57 AM
Operation is not allowed when the object is closed. Hannibal Classic ASP Basics 0 April 7th, 2010 10:45 AM
Operation is not allowed when the object is closed kingroon Classic ASP Databases 2 February 5th, 2008 10:29 AM
Operation is not allowed when the object is closed kah Javascript How-To 2 February 16th, 2005 07:20 AM
operation is not allowed when object is closed shoakat Classic ASP Databases 1 November 26th, 2004 12:17 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.