Compartir a través de


SqlCeDatabase.CreateConnection Method

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The latest Enterprise Library information can be found at the Enterprise Library site.

Creates a connection for this database.

Namespace:  Microsoft.Practices.EnterpriseLibrary.Data.SqlCe
Assembly:  Microsoft.Practices.EnterpriseLibrary.Data.SqlCe (in Microsoft.Practices.EnterpriseLibrary.Data.SqlCe.dll)

Syntax

'Declaration
Public Overrides Function CreateConnection As DbConnection
public override DbConnection CreateConnection()
public:
virtual DbConnection^ CreateConnection() override
public override function CreateConnection() : DbConnection

Return Value

The DbConnection for this database.

Remarks

This method has been overridden to support keeping a single connection open until you explicitly close it with a call to CloseSharedConnection().

See Also

SqlCeDatabase Class

Microsoft.Practices.EnterpriseLibrary.Data.SqlCe Namespace

System.Data.Common.DbConnection