Version

Connect Method (WebScheduleDbProvider)

Connects the WebScheduleDbProvider to a data source identified by the supplied Connection String.
Syntax
'Declaration
 
Public Function Connect( _
   ByVal connectionStr As String _
) As Boolean
public bool Connect( 
   string connectionStr
)

Parameters

connectionStr
A connection string compatible with the capabilities of the underlying data source.

Return Value

An indication of success (true indicates Connection has been updated to refer to the new data source, false indicates the connection has failed with no change to the existing Connection).
Remarks

Connections opened through Connect are managed by the WebScheduleDbProvider and will be closed when they are no longer needed for the processing of the current HTTP request (i.e., when the Page unloads). Using Connect hides the underlying data implementation and reduces housekeeping responsibilities associated with holding an IDbConnection reference directly.

Each time the Page posts back, any database connection will need to be re-established.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, 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