Export (0) Print
Expand All

IDbConnection.Close Method

Closes the connection to the database.

[Visual Basic]
Sub Close()
void Close();
void Close();
function Close();


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.

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


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

IDbConnection Interface | IDbConnection Members | System.Data Namespace | Open

© 2014 Microsoft