Collapse All Expand All Language Filter: Code: All Code: Multiple Code: Visual Basic Code: C# Code: Visual C++ Code: J# Code: JScript

EDKB12WS Reference
clsDBInteractionBase.cpMainConnectionProvider Property
See Also

Namespace: EDKB12WS.edokadb
Assembly: EDKB12WS (in EDKB12WS.exe)

# Syntax

Visual Basic
Public WriteOnly Property cpMainConnectionProvider() As clsConnectionProvider
C#
public clsConnectionProvider cpMainConnectionProvider {set;}
C++
public: property clsConnectionProvider^ cpMainConnectionProvider { void set( clsConnectionProvider^ value ); }
JScript
public function set cpMainConnectionProvider(value : clsConnectionProvider);

# Source code

Visual Basic | Copy Code
Public WriteOnly Property cpMainConnectionProvider() As clsConnectionProvider Set(ByVal Value As clsConnectionProvider) If Value Is Nothing Then ' // Invalid value Throw New ArgumentNullException("cpMainConnectionProvider", "Nothing passed as value to this property which is not allowed.") End If ' // A connection provider object is passed to this class. ' // Retrieve the SqlConnection object, if present and create a ' // reference to it. If there is already a MainConnection object ' // referenced by the membervar, destroy that one or simply ' // remove the reference, based on the flag. If Not (m_scoMainConnection Is Nothing) Then ' // First get rid of current connection object. Caller is responsible If m_bMainConnectionIsCreatedLocal Then ' // Is local created object, close it and dispose it. m_scoMainConnection.Close() m_scoMainConnection.Dispose() End If ' // Remove reference. m_scoMainConnection = Nothing End If m_cpMainConnectionProvider = CType(Value, clsConnectionProvider) m_scoMainConnection = m_cpMainConnectionProvider.scoDBConnection m_bMainConnectionIsCreatedLocal = False End Set End Property

# Platforms

Windows 8, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2 The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

# Version Information

## .NET Framework Supported in: 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0 ## .NET Compact Framework Supported in: 3.5, 2.0, 1.0 ## XNA Framework Supported in: 3.0, 2.0, 1.0

# See Also

## Reference clsDBInteractionBase Class clsDBInteractionBase clsDBInteractionBase Members EDKB12WS.edokadb Namespace