Compartir a través de


DataConnectionFactory.MakeDataConnectionFrom Method

Creates a new instance of the DataConnection class for the specified provider from an existing underlying provider object.

Namespace:  Microsoft.VisualStudio.Data
Assembly:  Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)

Syntax

'Declaration
Public Function MakeDataConnectionFrom ( _
    provider As Guid, _
    providerObj As Object _
) As DataConnection
public DataConnection MakeDataConnectionFrom(
    Guid provider,
    Object providerObj
)
public:
DataConnection^ MakeDataConnectionFrom(
    Guid provider, 
    Object^ providerObj
)
member MakeDataConnectionFrom : 
        provider:Guid * 
        providerObj:Object -> DataConnection
public function MakeDataConnectionFrom(
    provider : Guid, 
    providerObj : Object
) : DataConnection

Parameters

  • provider
    Type: System.Guid

    The unique identifier of a DDEX provider.

  • providerObj
    Type: System.Object

    An existing underlying provider object.

Return Value

Type: Microsoft.VisualStudio.Data.DataConnection
Returns a DataConnection object instance.

Exceptions

Exception Condition
ArgumentNullException

The providerObj parameter is null.

ArgumentException

The provider is not a registered DDEX provider.

Remarks

Other exceptions that occur indicate a provider-specific error during attachment of the provider connection object.

.NET Framework Security

See Also

Reference

DataConnectionFactory Class

Microsoft.VisualStudio.Data Namespace

DataConnectionSupport