다음을 통해 공유


DataCommand.DeriveSchema(String, Int32, DataParameter[], Int32) Method

Definition

Derives the schema returned from a specified command, indicating the layout of items and blocks in a data reader.

public:
 virtual Microsoft::VisualStudio::Data::DataReader ^ DeriveSchema(System::String ^ command, int commandType, cli::array <Microsoft::VisualStudio::Data::DataParameter ^> ^ parameters, int commandTimeout);
public virtual Microsoft.VisualStudio.Data.DataReader DeriveSchema (string command, int commandType, Microsoft.VisualStudio.Data.DataParameter[] parameters, int commandTimeout);
abstract member DeriveSchema : string * int * Microsoft.VisualStudio.Data.DataParameter[] * int -> Microsoft.VisualStudio.Data.DataReader
override this.DeriveSchema : string * int * Microsoft.VisualStudio.Data.DataParameter[] * int -> Microsoft.VisualStudio.Data.DataReader
Public Overridable Function DeriveSchema (command As String, commandType As Integer, parameters As DataParameter(), commandTimeout As Integer) As DataReader

Parameters

command
String

A command for which to derive the schema specific to a data source.

commandType
Int32

The command type for the indicated command, specifying how to interpret the contents of the command parameter.

parameters
DataParameter[]

An array of DataParameter objects for the specified command type. While this is an input parameter, the DDEX provider is still able to set properties on individual out and return value parameters. However, these will not be populated when deriving schema.

commandTimeout
Int32

The length of time, in seconds, to block the client before canceling the schema derivation and returning to the caller. A value of 0 indicates infinite timeout; a value of -1 indicates a provider default.

Returns

Returns a DataReader object. This object provides a forward-only, read-only data stream that describes the layout of items and blocks, that is, the schema, for the reader object returned upon executing the specified command.

Exceptions

The command or asyncCommandEvents are null.

The commandType specifies an invalid type.

The commandTimeout is less than -1.

The provider does not support this method.

Applies to