語言

IDTSDesigntimeComponent100.SetOutputColumnDataTypeProperties 方法

定義

設定物件的資料型態屬性 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 識別。

lOutputColumnID
Int32

物件的 IDTSOutputColumn100 識別。

eDataType
DataType

那個 DataType 專欄。

lLength
Int32

柱子的長度。

lPrecision
Int32

欄位的數字精確度。

lScale
Int32

柱子的數值刻度。

lCodePage
Int32

專欄的代碼頁。

屬性

備註

此方法的參數為物件的 IDTSOutputColumn100 特性,且這些屬性是個別唯讀的,必須使用此方法設定。 此方法之所以必要,是因為這些性質的數值彼此依賴。 它提供同時更新這些屬性的機制,並使元件與資料流任務能夠強制執行相依關係。 參數 eDataType 決定了其他參數值的需求。

下表列出在設定輸出欄位資料型態屬性時必須遵守的規則。

資料類型 長度 調整 Precision CodePage
DT_小數 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

適用於