IDTSOutputColumn100.SetDataTypeProperties 方法

定义

public:
 void SetDataTypeProperties(Microsoft::SqlServer::Dts::Runtime::Wrapper::Sql2012::DataType eDataType, int lLength, int lPrecision, int lScale, int lCodePage);
[System.Runtime.InteropServices.DispId(114)]
public void SetDataTypeProperties (Microsoft.SqlServer.Dts.Runtime.Wrapper.Sql2012.DataType eDataType, int lLength, int lPrecision, int lScale, int lCodePage);
[<System.Runtime.InteropServices.DispId(114)>]
abstract member SetDataTypeProperties : Microsoft.SqlServer.Dts.Runtime.Wrapper.Sql2012.DataType * int * int * int * int -> unit
Public Sub SetDataTypeProperties (eDataType As DataType, lLength As Integer, lPrecision As Integer, lScale As Integer, lCodePage As Integer)

参数

eDataType
DataType
lLength
Int32
lPrecision
Int32
lScale
Int32
lCodePage
Int32
属性

注解

此方法的参数是对象的只读属性,该对象的 IDTSOutputColumn100 值是使用此方法设置的。 此方法是必需的,因为这些属性的值彼此依赖。 此方法提供了一种以原子方式更新这些属性的机制,允许数据流强制实施依赖关系。 eDataType参数用于确定要对参数值执行的其他检查。

下表显示了在设置输出列的数据类型属性时强制执行的要求。

数据类型 长度 缩放 精度 CodePage
DT_DECIMAL 不强制执行 大于或等于0且小于或等于28。 不强制执行 不强制执行
DT_NUMERIC 不强制执行 大于或等于0且小于或等于38,小于或等于指定的精度。 大于或等于1且小于或等于38。 不强制执行
DT_BYTES 大于0且小于或等于8000。 不强制执行 不强制执行 不强制执行
DT_DBTIME2

DT_DBTIMESTAMP2

DT_DBTIMESTAMPOFFSET
不强制执行。 大于或等于0且小于或等于7。 不强制执行。 不强制执行。
DT_STR 大于0且小于或等于8000。 不强制执行 不强制执行 Not 0。
DT_TEXT 不强制执行 不强制执行 不强制执行 Not 0。
DT_WSTR 大于0且小于或等于4000。 不强制执行 不强制执行 不强制执行

有关 Integration Services 数据类型及其属性的详细信息,请参阅 Integration Services 数据类型

开发自定义源组件开发具有同步输出的自定义转换组件开发具有异步输出的自定义转换组件时,将对 SetDataTypeProperties 方法的使用进行简要介绍或演示。

适用于