dotConnect for PostgreSQL Documentation
Devart.Data.PostgreSql Namespace / PgSqlConnection Class / Close Method

In This Topic
    Close Method (PgSqlConnection)
    In This Topic
    Closes the connection to the data source. This is the preferred method of closing any open connection.
    Syntax
    'Declaration
     
    Public Overrides Sub Close() 
    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.

    Note that you must manually close all connections opened by the application. If a connection goes out of scope, it is not closed automatically till the application shuts down.

    An application can call Close more than one time without generating an exception.

    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also