Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
Previous Versions
.NET Framework 1.1
.NET Framework
Reference
Methods
 Close Method
This page is specific to
Microsoft Visual Studio 2003/.NET Framework 1.1

Other versions are also available for the following:
.NET Framework Class Library
SqlCeConnection.Close Method
Note: This namespace, class, or member is supported only in version 1.1 of the .NET Framework.

Closes the connection to the data source. This is the preferred method of closing any open connection.

[Visual Basic]
Public Overridable Sub Close() Implements IDbConnection.Close
[C#]
public virtual void Close();
[C++]
public: virtual void Close();
[JScript]
public function Close();

Implements

IDbConnection.Close

Remarks

The Close method rolls back any pending transactions and then releases the connection. If Close is called while handling a StateChange event, no additional StateChange events are fired.

An application can call Close more than one time. No exception is generated.

Requirements

Platforms: .NET Compact Framework

.NET Framework Security: 

See Also

SqlCeConnection Class | SqlCeConnection Members | System.Data.SqlServerCe Namespace | Open

© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker