DataCommand.DeriveParameters Method (String, DataCommandType)

Derives the parameters that can be specified for a given command.

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

Syntax

'宣言
Public Function DeriveParameters ( _
    command As String, _
    commandType As DataCommandType _
) As IVsDataParameter()
'使用
Dim instance As DataCommand
Dim command As String
Dim commandType As DataCommandType
Dim returnValue As IVsDataParameter()

returnValue = instance.DeriveParameters(command, _
    commandType)
public IVsDataParameter[] DeriveParameters(
    string command,
    DataCommandType commandType
)
public:
virtual array<IVsDataParameter^>^ DeriveParameters(
    String^ command, 
    DataCommandType commandType
) sealed
public final function DeriveParameters(
    command : String, 
    commandType : DataCommandType
) : IVsDataParameter[]

Parameters

  • command
    Type: System.String

    A command from which to derive parameters specific to a data source.

Return Value

Type: []

An array of IVsDataParameter objects. Each object represents a parameter derived from the command.

Implements

IVsDataCommand.DeriveParameters(String, DataCommandType)

Exceptions

Exception Condition
ArgumentNullException

The command parameter is a null reference (Nothing in Visual Basic).

Remarks

After the instances of the derived parameter objects are retrieved, the client owns them and can modify their values as needed. The client will then pass these values along with a command type set to Text and an appropriate time-out value to the Execute(String, DataCommandType, [], Int32) or the [M:Microsoft.VisualStudio.Data.Framework.DataCommand.ExecuteWithoutResults(System.String,T:Microsoft.VisualStudio.Data.Services.SupportEntities.DataCommandType,Microsoft.VisualStudio.Data.Framework.DataParameter[],System.Int32)] method.

注意

Other exceptions that occur indicate that the parameter derivation failed for a provider-specified reason.

Permissions

See Also

Reference

DataCommand Class

DataCommand Members

DeriveParameters Overload

Microsoft.VisualStudio.Data.Framework Namespace

CreateParameter