DataCommand.DeriveSchema 方法

定義

多載

DeriveSchema(String)

從指定的命令衍生所傳回的架構。Derives the schema returned from a specified command. 架構會指出資料讀取器中的專案和區塊的版面配置。The schema indicates the layout of items and blocks in a data reader.

DeriveSchema(String, DataCommandType)

從指定的命令衍生所傳回的架構。Derives the schema returned from a specified command. 架構會指出資料讀取器中的專案和區塊的版面配置。The schema indicates the layout of items and blocks in a data reader.

DeriveSchema(String, DataCommandType, IVsDataParameter[])

從指定的命令衍生所傳回的架構。Derives the schema returned from a specified command. 架構會指出資料讀取器中的專案和區塊的版面配置。The schema indicates the layout of items and blocks in a data reader.

DeriveSchema(String, DataCommandType, IVsDataParameter[], Int32)

從指定的命令衍生所傳回的架構。Derives the schema returned from a specified command. 架構會指出資料讀取器中的專案和區塊的版面配置。The schema indicates the layout of items and blocks in a data reader.

DeriveSchema(String)

從指定的命令衍生所傳回的架構。Derives the schema returned from a specified command. 架構會指出資料讀取器中的專案和區塊的版面配置。The schema indicates the layout of items and blocks in a data reader.

public:
 virtual Microsoft::VisualStudio::Data::Services::SupportEntities::IVsDataReader ^ DeriveSchema(System::String ^ command);
public Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataReader DeriveSchema (string command);
abstract member DeriveSchema : string -> Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataReader
override this.DeriveSchema : string -> Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataReader
Public Function DeriveSchema (command As String) As IVsDataReader

參數

command
String

用來衍生資料來源特定架構的命令。A command for which to derive the schema that is specific to a data source.

傳回

IVsDataReader

IVsDataReader 物件。An IVsDataReader 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.

實作

例外狀況

command 參數為 null。The command parameter is null.

適用於

DeriveSchema(String, DataCommandType)

從指定的命令衍生所傳回的架構。Derives the schema returned from a specified command. 架構會指出資料讀取器中的專案和區塊的版面配置。The schema indicates the layout of items and blocks in a data reader.

public:
 virtual Microsoft::VisualStudio::Data::Services::SupportEntities::IVsDataReader ^ DeriveSchema(System::String ^ command, Microsoft::VisualStudio::Data::Services::SupportEntities::DataCommandType commandType);
public Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataReader DeriveSchema (string command, Microsoft.VisualStudio.Data.Services.SupportEntities.DataCommandType commandType);
abstract member DeriveSchema : string * Microsoft.VisualStudio.Data.Services.SupportEntities.DataCommandType -> Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataReader
override this.DeriveSchema : string * Microsoft.VisualStudio.Data.Services.SupportEntities.DataCommandType -> Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataReader
Public Function DeriveSchema (command As String, commandType As DataCommandType) As IVsDataReader

參數

command
String

用來衍生資料來源特定架構的命令。A command for which to derive the schema specific to a data source.

commandType
DataCommandType

命令的類型,指定如何解讀參數的內容 commandThe type of the command that specifies how to interpret the contents of the command parameter. 命令類型可以是列舉中的值 DataCommandType ,或是提供者所定義的自訂命令類型,可以藉由強制從整數轉換成列舉來傳入 DataCommandTypeThe command type could either be a value from the DataCommandType enumeration or a custom command type defined by a provider, which can be passed in by forcing a cast from an integer to the DataCommandType enumeration.

傳回

IVsDataReader

IVsDataReader 物件。An IVsDataReader 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.

實作

例外狀況

command 參數為 null。The command parameter is null.

適用於

DeriveSchema(String, DataCommandType, IVsDataParameter[])

從指定的命令衍生所傳回的架構。Derives the schema returned from a specified command. 架構會指出資料讀取器中的專案和區塊的版面配置。The schema indicates the layout of items and blocks in a data reader.

public:
 virtual Microsoft::VisualStudio::Data::Services::SupportEntities::IVsDataReader ^ DeriveSchema(System::String ^ command, Microsoft::VisualStudio::Data::Services::SupportEntities::DataCommandType commandType, cli::array <Microsoft::VisualStudio::Data::Services::SupportEntities::IVsDataParameter ^> ^ parameters);
public Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataReader DeriveSchema (string command, Microsoft.VisualStudio.Data.Services.SupportEntities.DataCommandType commandType, Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataParameter[] parameters);
abstract member DeriveSchema : string * Microsoft.VisualStudio.Data.Services.SupportEntities.DataCommandType * Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataParameter[] -> Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataReader
override this.DeriveSchema : string * Microsoft.VisualStudio.Data.Services.SupportEntities.DataCommandType * Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataParameter[] -> Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataReader
Public Function DeriveSchema (command As String, commandType As DataCommandType, parameters As IVsDataParameter()) As IVsDataReader

參數

command
String

用來衍生資料來源特定架構的命令。A command for which to derive the schema specific to a data source.

commandType
DataCommandType

命令的類型,指定如何解讀參數的內容 commandThe type of the command that specifies how to interpret the contents of the command parameter. 命令類型可以是列舉中的值 DataCommandType ,或是提供者所定義的自訂命令類型,可以藉由強制從整數轉換成列舉來傳入 DataCommandTypeThe command type could either be a value from the DataCommandType enumeration or a custom command type defined by a provider, which can be passed in by forcing a cast from an integer to the DataCommandType enumeration.

parameters
IVsDataParameter[]

物件的陣列, IVsDataParameter 代表指定之命令類型的命令參數。An array of IVsDataParameter objects representing the command parameters for the specified command type.

傳回

IVsDataReader

IVsDataReader 物件。An IVsDataReader 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.

實作

例外狀況

command 參數為 null。The command parameter is null.

適用於

DeriveSchema(String, DataCommandType, IVsDataParameter[], Int32)

從指定的命令衍生所傳回的架構。Derives the schema returned from a specified command. 架構會指出資料讀取器中的專案和區塊的版面配置。The schema indicates the layout of items and blocks in a data reader.

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

參數

command
String

用來衍生資料來源特定架構的命令。A command for which to derive the schema specific to a data source.

commandType
DataCommandType

命令的類型,指定如何解讀參數的內容 commandThe type of the command that specifies how to interpret the contents of the command parameter. 命令類型可以是列舉中的值 DataCommandType ,或是提供者所定義的自訂命令類型,可以藉由強制從整數轉換成列舉來傳入 DataCommandTypeThe command type could either be a value from the DataCommandType enumeration or a custom command type defined by a provider, which can be passed in by forcing a cast from an integer to the DataCommandType enumeration.

parameters
IVsDataParameter[]

物件的陣列, IVsDataParameter 代表指定之命令類型的命令參數。An array of IVsDataParameter objects representing the command parameters for the specified command type.

commandTimeout
Int32

先封鎖用戶端的時間長度(以秒為單位),以在取消架構衍生並返回呼叫端之前封鎖用戶端。The length of time, in seconds, to block the client before canceling the schema derivation and returning to the caller. 值為0表示無限超時時間;值-1 表示提供者預設值。A value of 0 indicates infinite time-out; a value of -1 indicates a provider default.

傳回

IVsDataReader

IVsDataReader 物件。An IVsDataReader 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.

實作

例外狀況

command 參數為 null。The command parameter is null.

commandTimeout 參數小於 -1。The commandTimeout parameter is less than -1.

適用於