Vertragsverwaltung-Klassenbibliothek  

clsDBInteractionBase.cpMainConnectionProvider -Eigenschaft

[Visual Basic]
Public WriteOnly Property cpMainConnectionProvider() As clsConnectionProvider

Quellcode

[Visual Basic]
		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

Forderungen

Plattformen: Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

Siehe auch

clsDBInteractionBase