Close method

Closes a database connection.

Syntax
Visual Basic

Public Overrides Sub Close()
C#

public override void Close();
Remarks

The Close method rolls back any pending transactions. It then releases the connection to the connection pool, or closes the connection if connection pooling is disabled. If Close is called while handling a StateChange event, no additional StateChange events are fired. An application can call Close multiple times.

See also