-
closing recordset after closing connection
hi there....
my friend believes that no matter if you write this code::
cn.close
set cn = nothing
rs.close
set rs = nothing
but I believe that it's not logical....what do you mean?
Sonia
-
Object Close
Hi,
if recordset/Connection is open, it will get closed and destroyed, and if it is already closed, then it will just get destroyed.
so better to destroy the objects while closing...
--
Venkat
-
no I mean the sequence order of closing them.....do you agree with it? First closing connection the closing recordset?
Sonia
-
Using the Close method to close a Connection object also closes any active Recordset objects associated with the connection. A Command object associated with the Connection object you are closing will persist, but it will no longer be associated with a Connection object...
(ie.,) its ActiveConnection property will be set to Nothing....
So
cn.close
set cn = nothing
will close rs and no point in closing the RS.
Similar Threads
-
By Daniel Teufert in forum VB Classic
Replies: 2
Last Post: 04-24-2002, 02:34 PM
-
By Jonathan Gibbs in forum VB Classic
Replies: 0
Last Post: 08-09-2001, 02:34 PM
-
By Sok in forum VB Classic
Replies: 2
Last Post: 02-09-2001, 12:28 PM
-
By Darta in forum VB Classic
Replies: 1
Last Post: 10-24-2000, 04:48 PM
-
By Justin Orton in forum ASP.NET
Replies: 0
Last Post: 04-30-2000, 08:34 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks