Recordset Question

Results 1 to 2 of 2

Thread: Recordset Question

  1. #1
    Join Date
    Dec 1969

    Default Recordset Question

    I have one recordSet object in my script. I use it for several queries and updates.<BR><BR>My question is: Do I have to close "rs.Close()" the recordSet object after every query or update? Or would I run all the queries and updates I want, and only close the object at the end of the page.<BR><BR>Cheers, Alfred Low<BR><BR>PS: Apologies to Atrax (and the MessageBoard in general). I was not aware I cross-posted and it definitely was not intended.

  2. #2
    Join Date
    Dec 1969

    Default RE: Recordset Question

    Hi,<BR><BR>U can use the same recordset object for different kind of operations in ur script. However, u need to close the current scope of ur recordset and make it available for the next operation that u need to do. So will do something like the following...<BR><BR>SET rs=server.createobject("adodb.recordset")<BR><BR>r "select statement" &#039; recordset opened to fetch some records...<BR><BR>now if u need to use the recordset to do another job then u will have to close the recordset like..<BR>rs.close &#039; u need not do a set rs=nothing<BR><BR>then again open ue recordset to do another job.<BR><BR>Lastly u will close the recordset and set it to nothing to releive all the resources that it is holding<BR><BR>Ganesh

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts