CodeCharge Studio

Close Method (ASP)

Applies to

Connection Object

Syntax

<connection>.Close

Description

This method closes a database connection and releases its resources. This method should always be called after a currently open database connection is no longer needed. However, this should be done with connections that were created manually only or if page processing is finished because of user's redirection for instance.

Examples

This example closes database connection and redirects to a root website URL. This may be used if some fatal page requirement is not met (required parameter for instance).
It assumes connection is called Connection1.
DBConnection1.Close
Response.Redirect "/"
Response.End

See also

Redirect Variable
Before Unload Event


On-line, printable versions and updates