IDataClass.Execute Method (IMethodInstance, ILobSystemInstance, Object )
Executes the given method instance against a given external system instance with the given parameters.
Namespace: Microsoft.BusinessData.MetadataModel
Assembly: Microsoft.BusinessData (in Microsoft.BusinessData.dll)
Syntax
'Declaration
Function Execute ( _
methodInstanceToExecute As IMethodInstance, _
lobSystemInstance As ILobSystemInstance, _
ByRef overrideArgs As Object() _
) As Object
'Usage
Dim instance As IDataClass
Dim methodInstanceToExecute As IMethodInstance
Dim lobSystemInstance As ILobSystemInstance
Dim overrideArgs As Object()
Dim returnValue As Object
returnValue = instance.Execute(methodInstanceToExecute, _
lobSystemInstance, overrideArgs)
Object Execute(
IMethodInstance methodInstanceToExecute,
ILobSystemInstance lobSystemInstance,
ref Object[] overrideArgs
)
Parameters
methodInstanceToExecute
Type: Microsoft.BusinessData.MetadataModel.IMethodInstanceThe method instance to execute.
lobSystemInstance
Type: Microsoft.BusinessData.MetadataModel.ILobSystemInstanceThe external system instance to execute the method instance against.
overrideArgs
Type: []The arguments to pass to the external system. The overrideArgs array must have as many elements as there are parameters in the BDC model for that method, including the return parameter.
Return Value
Type: System.Object
The return value of the method instance.
Remarks
An InvalidOperationException will be thrown if the set of parameters provided do not exactly match what is defined by the metadata.
Instances of objects in the Business Data Connectivity object model are tied to the Metadata Store they are obtained from. Using instances tied to one Metadata Store with the instances from another Metadata Store will cause data corruption and other unexpected behavior. For more information, see DatabaseBackedMetadataCatalog, FileBackedMetadataCatalog, and RemoteSharedFileBackedMetadataCatalog.