Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Databases
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. 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 Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 11th, 2013, 09:53 AM
Registered User
Points: 43, Level: 1
Points: 43, Level: 1 Points: 43, Level: 1 Points: 43, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2012
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Operation is not allowed when the object is closed.

Can some one please let me know why I am receiving this error

Here is asp code:

Dim ObjRS
Set objConn = Server.CreateObject("ADODB.Connection")
Set ObjRS = Server.CreateObject("ADODB.Recordset")
Set Objcmd = Server.CreateObject("ADODB.Command")
objConn.Open "Provider=SQLOLEDB;User ID=eLearning; password=admin00;Data Source=QTOMASQL7SQL1.ad.qintra.com,7115;Initial Catalog=NTDElearning"
Set Objcmd.ActiveConnection = objConn
Objcmd.CommandText = "GAME_Sp_LeaderBoard"
Objcmd.CommandType = adCmdStoredProc
Objcmd.Parameters.Append Objcmd.CreateParameter("@userCuid", adVarchar, adParamInput, 10, "rkgauta")
Objcmd.Parameters.Append Objcmd.CreateParameter("@gameId", adInteger, adParamInput, 4, 4)

set ObjRS = Objcmd.Execute

IF ObjRS.EOF THEN
Response.Write "Sorry, no records were found for that searchterm"
else
response.Write(objRs.fields("UserId"))
end if

When I run this it throws :
(Operation is not allowed when the object is closed.)

My sp runs fine when I execute in SSMS ,It returns rows.

There is somthing wrong ,not sure .Please help on this
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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 lightmaker Classic ASP Basics 1 June 6th, 2008 12:29 PM
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



All times are GMT -4. The time now is 09:47 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.