Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
| Search | Today's Posts | Mark Forums Read
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 April 7th, 2010, 10:45 AM
Authorized User
Join Date: Feb 2006
Location: Bangalore, Karnataka, India.
Posts: 63
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Hannibal
Default Operation is not allowed when the object is closed.

I am trying to do 2 sql operations in ASP.
    '* open connection
    Dim con    
    Set con = Server.CreateObject("ADODB.Connection")    
    con.ConnectionString = "connectivity code"
    Dim rs
    Set rs= Server.CreateObject("ADODB.recordset")
    sql = " sql statement"
    rs.Open sql,con
    str1 = rs("values")   

    Dim con1 
    Set con1 = Server.CreateObject("ADODB.Connection")    
    con1.ConnectionString = "connection statement"
    Dim rs1
    Set rs1 = Server.CreateObject("ADODB.recordset")
    strsql = "calling stored procedure "
    rs1.Open strsql,con1
    str2= rs1("value2")   
I am using the same connection string for both the statements.
I am getting error as "Operation is not allowed when the object is closed."
How to solve this?
Thank you

Similar Threads
Thread Thread Starter Forum Replies Last Post
Operation is not allowed when the object is closed. davfergus Classic ASP Databases 2 January 29th, 2010 05:29 PM
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
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.