IDTSDesigntimeComponent100.SetOutputColumnDataTypeProperties 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
设置对象的数据 IDTSOutputColumn100 类型属性。
public:
void SetOutputColumnDataTypeProperties(int lOutputID, int lOutputColumnID, Microsoft::SqlServer::Dts::Runtime::Wrapper::DataType eDataType, int lLength, int lPrecision, int lScale, int lCodePage);
[System.Runtime.InteropServices.DispId(32)]
public void SetOutputColumnDataTypeProperties(int lOutputID, int lOutputColumnID, Microsoft.SqlServer.Dts.Runtime.Wrapper.DataType eDataType, int lLength, int lPrecision, int lScale, int lCodePage);
[<System.Runtime.InteropServices.DispId(32)>]
abstract member SetOutputColumnDataTypeProperties : int * int * Microsoft.SqlServer.Dts.Runtime.Wrapper.DataType * int * int * int * int -> unit
Public Sub SetOutputColumnDataTypeProperties (lOutputID As Integer, lOutputColumnID As Integer, eDataType As DataType, lLength As Integer, lPrecision As Integer, lScale As Integer, lCodePage As Integer)
参数
- lOutputID
- Int32
物体的 IDTSOutput100 ID。
- lOutputColumnID
- Int32
物体的 IDTSOutputColumn100 ID。
- lLength
- Int32
列的长度。
- lPrecision
- Int32
列的数值精度。
- lScale
- Int32
柱子的数值刻度。
- lCodePage
- Int32
专栏的代码页。
- 属性
注解
该方法的参数是对象的 IDTSOutputColumn100 属性,单独只读,必须通过该方法设置。 这种方法之所以必要,是因为这些属性的取值彼此依赖。 它提供了同时更新这些属性的机制,使组件和数据流任务能够强制执行依赖关系。 参数 eDataType 决定了其他参数值的要求。
下表列出了在设置输出列数据类型属性时必须遵守的规则。
| 数据类型 | 长度 | 范围 | 精准率 | CodePage |
|---|---|---|---|---|
| DT_DECIMAL | 0 | 大于 0 且小于或等于 28。 | 0 | 0 |
| DT_CY | 0 | 0 | 0 | 0 |
| DT_NUMERIC | 0 | 大于0,大小于或等于28,且低于精度。 | 大于或等于 1 且小于或等于 38。 | 0 |
| DT_BYTES | 大于 0。 | 0 | 0 | 0 |
| DT_STR | 大于 0 且小于 8000。 | 0 | 0 | 不为 0,并且是一个有效的代码页。 |
| DT_TEXT | 大于 0 且小于 8000。 | 0 | 0 | 不为 0,并且是一个有效的代码页。 |
| DT_WSTR | 大于 0 且小于 4000。 | 0 | 0 | 0 |