Export (0) Print
Expand All

IDbConnection.Close Method

Closes the connection to the database.

[Visual Basic]
Sub Close()
[C#]
void Close();
[C++]
void Close();
[JScript]
function 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.

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

Requirements

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

Show:
© 2014 Microsoft