Ejemplo n.º 1
0
 /// <summary>
 /// Set values of attribute, when given a column
 /// </summary>
 /// <param name="newColumn">Column to take values from</param>
 private void SetValues(Column newColumn)
 {
     DataType           = SQLtoSSIS[newColumn.DataType];
     CharacterMaxLength = newColumn.CharacterMaxLength;
     Precision          = newColumn.Precision;
     Scale = newColumn.Scale;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Perform a change on an attribute, this includes renaming and datatype change
        /// </summary>
        /// <param name="c">Relevant ColumnMetaChange</param>
        public void Change(ColumnMetaChange c)
        {
            Column newColumn = c.NewColumn;

            Name = newColumn.Name;

            SetValues(newColumn);

            ((IDTSOutputColumn100)AttributeRef).SetDataTypeProperties(SQLtoSSIS[newColumn.DataType], CharacterMaxLength, Precision, Scale, 0);

            if (ExternalRef != null)
            {
                // TODO: Maybe problems if the column doesn't have precision/scale/whatever
                ExternalRef.DataType  = SQLtoSSIS[newColumn.DataType];
                ExternalRef.Length    = newColumn.CharacterMaxLength;
                ExternalRef.Precision = newColumn.Precision;
                ExternalRef.Scale     = newColumn.Scale;
            }
        }