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.GuidThe unique identifier of a DDEX provider.
providerObj
Type: System.ObjectAn 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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.