当实现由选件类,从指定的命令派生返回的架构。 模式在数据读取器指示项目格式和块。
命名空间: 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
类型:String一个命令可以派生特定于数据源的架构。
commandType
类型:Microsoft.VisualStudio.Data.Services.SupportEntities.DataCommandType从表示指示的命令 DataCommandType 枚举的值命令类型,指定如何解释 command 参数的内容。
parameters
类型:array<Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataParameter[]数组指定的命令类型的 DataParameter 对象。 尽管这是输入参数时,DDEX提供程序可以改为设置的属性和返回值参数。 但是,那么,当派生模式时,它们不会填充。
commandTimeout
类型: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 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。