IVsDataCommand.DeriveSchema 方法 (String, DataCommandType, array<IVsDataParameter , Int32)

当实现由选件类,从指定的命令派生返回的架构。模式在数据读取器指示项目格式和块。

命名空间:  Microsoft.VisualStudio.Data.Services.SupportEntities
程序集:  Microsoft.VisualStudio.Data.Services(在 Microsoft.VisualStudio.Data.Services.dll 中)

语法

声明
Function DeriveSchema ( _
    command As String, _
    commandType As DataCommandType, _
    parameters As IVsDataParameter(), _
    commandTimeout As Integer _
) As IVsDataReader
IVsDataReader DeriveSchema(
    string command,
    DataCommandType commandType,
    IVsDataParameter[] parameters,
    int commandTimeout
)
IVsDataReader^ DeriveSchema(
    String^ command, 
    DataCommandType commandType, 
    array<IVsDataParameter^>^ parameters, 
    int commandTimeout
)
abstract DeriveSchema : 
        command:string * 
        commandType:DataCommandType * 
        parameters:IVsDataParameter[] * 
        commandTimeout:int -> IVsDataReader 
function DeriveSchema(
    command : String, 
    commandType : DataCommandType, 
    parameters : IVsDataParameter[], 
    commandTimeout : int
) : IVsDataReader

参数

  • command
    类型:System.String
    一个命令可以派生特定于数据源的架构。
  • commandTimeout
    类型:System.Int32
    时间长度,秒,取消模式派生并返回之前阻止客户端调用方。值0表示无限超时;值-1表示一个提供默认值。

返回值

类型:Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataReader
IVsDataReader 对象。此对象用于读取器对象提供描述项目格式并阻止,即,架构的前向,只读数据流,返回在执行指定的命令。

备注

数据读取器模式返回必须采用方法遵循特定的格式。要返回的各个结果,当您执行命令,应具有在数据读取器的结果。描述项目将返回这些结果中的每一个都应当包含块,则在执行命令时。该声明应包含以下项:

  • 名称(字符串):项目的名称。

  • 序号(、):项的位置。

  • UserDataType (字符串):项目(例如,“myType”)的用户数据类型。

  • NativeDataType (字符串):项目的本机数据类型(例如,“nvarchar”)。

  • ProviderDataType (、):项目(例如,System.Data.DbType.StringFixedLength)的提供程序数据类型。

  • FrameworkDataType (类型):项目(例如,System.Int32)的framework数据类型。

  • 长度(、):项目的最大长度,如果适用)。

  • 精度(、):项目的精度,如果适用)。

  • 缩放(、):项目的缩放,如果适用)。

  • 可以为null (布尔值):项目的nullability。

nullnull 引用(在 Visual Basic 中为 Nothing) 对象。

说明说明

发生的其他异常指示参数派生为一个提供程序指定的原因而失败。

.NET Framework 安全性

请参见

参考

IVsDataCommand 接口

DeriveSchema 重载

Microsoft.VisualStudio.Data.Services.SupportEntities 命名空间