コード例 #1
0
        public static IDTSOutputColumn100 AddKeyOutputColumns(IDTSOutput100 keyRecords)
        {
            IDTSOutputColumnCollection100 outputColumnCollection = keyRecords.OutputColumnCollection;
            IDTSOutputColumn100           outputColumn           = outputColumnCollection.NewAt(0);

            outputColumn.Name = MessageStrings.KeyRecordKeyColumnName;
            outputColumn.SetDataTypeProperties(DataType.DT_GUID, 0, 0, 0, 0);
            outputColumn.Description = MessageStrings.KeyRecordKeyColumnDescription;
            ManageProperties.AddOutputColumnProperties(outputColumn.CustomPropertyCollection);
            ManageProperties.SetPropertyValue(outputColumn.CustomPropertyCollection, ManageProperties.usageOfColumn, Utilities.usageOfColumnEnum.Key);
            ManageProperties.SetPropertyValue(outputColumn.CustomPropertyCollection, ManageProperties.keyOutputColumnID, -2);

            return(outputColumn);
        }
コード例 #2
0
        public static IDTSOutputColumn100 AddKeyOutputColumns(IDTSOutput100 keyRecords, IDTSOutput100 errorOutput)
        {
            IDTSOutputColumn100 outputColumn = AddKeyOutputColumns(keyRecords);

            IDTSOutputColumn100 errorOutputColumn = errorOutput.OutputColumnCollection.New();

            errorOutputColumn.Name = MessageStrings.KeyRecordKeyColumnName;
            errorOutputColumn.SetDataTypeProperties(DataType.DT_GUID, 0, 0, 0, 0);
            errorOutputColumn.Description = MessageStrings.KeyRecordKeyColumnDescription;
            ManageProperties.AddOutputColumnProperties(errorOutputColumn.CustomPropertyCollection);
            ManageProperties.SetPropertyValue(errorOutputColumn.CustomPropertyCollection, ManageProperties.usageOfColumn, Utilities.usageOfColumnEnum.Key);
            ManageProperties.SetPropertyValue(errorOutputColumn.CustomPropertyCollection, ManageProperties.keyOutputColumnID, outputColumn.ID);

            return(outputColumn);
        }