Quick References
      ADO
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      VBScript
      WML
      WMLScript
      WSH
      XHTML
      XML DOM
      XSLT

Features
      Knowledge Base
      Tutorials

Partners
     ZVON.ORG
     XML
     Planet Source Code
     VisualBuilder
     Web Design
     Your HTML Source
     XML/XSLT Forums
     ASPAlliance
     Scripts
     
     Programmers Heaven
     Tek-Tips Forums
     Developer Fusion
     Code Project











METHOD   Connection::Close

connectionobject.Close

The Close method is used to close a Connection object and certain associated objects. Closing an Connection object does not delete it from memory. You can later use the Open method to reopen the same Connection.
 
If there are open RecordSet objects associated with the Connection object being closed, then all of the RecordSet objects are automatically closed. There is also a rollback of all pending changes in the open RecordSet objects. Calling Close while a transaction is in progress will generate an error.
 
If there is an open Command object associated with the Connection object being closed, the Command object remains open, but its ActiveConnection property is set to Nothing and it loses all association with the closed Connection.
 
If you have closed an object and you no longer need it, you can set it equal to Nothing which will remove it from memory.
 
Code (VBScript):
If objConnection.State = adStateOpen Then
   objConnection.Close
End If
Set objConnection = Nothing

 


Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information