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參數是用來決定要在參數值上執行的其他檢查。

下表顯示在設定輸出資料行的資料類型屬性時,所強制執行的需求。

DataType 長度 調整 精確度 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。 不強制執行 不強制執行 不是0。
DT_TEXT 不強制執行 不強制執行 不強制執行 不是0。
DT_WSTR 大於0且小於或等於4000。 不強制執行 不強制執行 不強制執行

如需 Integration Services 資料類型和其屬性的詳細資訊,請參閱 Integration Services 資料類型

開發自訂來源元件開發具有同步輸出的自訂轉換元件,以及使用 非同步輸出開發自訂轉換元件的過程中,我們會簡短地討論或示範 SetDataTypeProperties 方法的使用方式。

適用於