Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - strange error when closing RS
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

strange error when closing RS

 Post Reply Post Reply Page  12>
Author
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Topic: strange error when closing RS
    Posted: 02 June 2003 at 5:02am

am confused about an error i keep getting....

ADODB.Recordset error '800a0e78'

Operation is not allowed when the object is closed.

/page.asp, line 13

but the strange thing is... am tryin to "close" the recordset on like 13

b4 i put the "response.redirect" above closing to get it to work.....

but then i thought it wouldnt close the record set

does anyone understand this?

Back to Top
TYSON View Drop Down
Groupie
Groupie


Joined: 18 August 2002
Location: Australia
Status: Offline
Points: 142
Post Options Post Options   Thanks (0) Thanks(0)   Quote TYSON Quote  Post ReplyReply Direct Link To This Post Posted: 02 June 2003 at 7:31am
Are you sure the recordset is open?
Back to Top
Gullanian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gullanian Quote  Post ReplyReply Direct Link To This Post Posted: 02 June 2003 at 8:16am

Yeah, you can only get that error if the recordset is definatly open, post your code here if its not too big

sounds like you alreasy closed it, before u redirect do:

set rsObj = Nothing

as well



Edited by Gullanian
Back to Top
farrukh View Drop Down
Groupie
Groupie
Avatar

Joined: 10 May 2002
Location: Pakistan
Status: Offline
Points: 147
Post Options Post Options   Thanks (0) Thanks(0)   Quote farrukh Quote  Post ReplyReply Direct Link To This Post Posted: 02 June 2003 at 3:21pm
please paste the code here................ so we can help u
i have collected some nice avatars (37) and smileys (227) here you can download
http://www24.brinkster.com/webmastertool/download.html
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 03 June 2003 at 2:47am

<!--#include virtual="/include/global.asp"-->
<%
id = Request.QueryString("id")
CID = Request.QueryString("CID")
PID = Request.QueryString("PID")
%>
<!--#include virtual="/include/Conn.asp"-->

<%
  sql = "DELETE * FROM Notes WHERE ID = " & ID
  set rsDelete = conn.Execute(sql)
 
  rsDelete.close
  set rsDelete = nothing
  conn.close
  set conn = nothing


 response.redirect("notes-frame.asp?CID=" & CID & "&PID=" & PID)
%>

 see.... i havent closed it yet... for sum reason it doesnt like to close it

the line in red is line 13

Back to Top
Gary View Drop Down
Senior Member
Senior Member
Avatar

Joined: 20 March 2002
Location: United Kingdom
Status: Offline
Points: 326
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gary Quote  Post ReplyReply Direct Link To This Post Posted: 03 June 2003 at 2:51am

I'm not 100% sure on this, but I dont think that you can close a recordset - you can only set it to Nothing.

It is the connection which needs to be closed (as you have done so in your code).

Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 03 June 2003 at 2:55am

oh... well i kinda learn from this other (kinda crap and "nameless") forum

but i close the RS on other pages and it works fine... hense the reason am confused

it works on sum pages but not others

Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 03 June 2003 at 8:16am
You problem is not rs.Close your problem is your SQL syntax. It is not Delete *....
it is just like "Delete FROM Notes WHERE ID = " & ID
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.