public void SetDataTypeProperties(SSISDataType dataType, int length, int precision, int scale, int codePage) { if (dataType != SSISDataType.DT_EMPTY) { OutputColumn.SetDataTypeProperties(DtsUtility.EnumAToEnumB <SSISDataType, DataType>(dataType), length, precision, scale, codePage); } }
public void SetDataTypeProperties(SSISDataType dataType, int length, int precision, int scale, int codePage) { OutputColumn.SetDataTypeProperties(dataType, length, precision, scale, codePage); if (_parentComponent.SourceCode.Length > 0) { _parentComponent.RebuildProject(null); } }
public void SetDataType(SSISDataType dataType, int length, int precision, int scale, int codePage) { DataType = dataType; Length = length; Precision = precision; Scale = scale; CodePage = codePage; }
public void SetColumnDataType(SSISDataType dataType, string columnType, string columnDelimiter, int columnWidth, int maximumWidth, int dataPrecision, int dataScale) { if (dataType == SSISDataType.DT_STR) { DataType = dataType; ColumnDelimiter = columnDelimiter; ColumnType = columnType; ColumnWidth = columnWidth; MaximumWidth = maximumWidth; DataPrecision = dataPrecision; DataScale = dataScale; TextQualified = (String.IsNullOrEmpty(_parentConnectionManager.TextQualifier) ? false : true); } else { DataType = dataType; ColumnDelimiter = columnDelimiter; ColumnType = columnType; ColumnWidth = 0; MaximumWidth = 0; DataPrecision = dataPrecision; DataScale = dataScale; } }
public void AddLookUpColumnIntoDataFlow(string lookupColumnName, string lookupColumnNameAlias, RowDisposition truncationRowDisposition, SSISDataType dataType, int length, int precision, int scale, int codePage, string inputColumnToReplace = null) { if (String.IsNullOrEmpty(inputColumnToReplace)) { ISOutputColumn oc = new ISOutputColumn(this, MatchOutput_m.Name, lookupColumnName, RowDisposition.RD_NotUsed, truncationRowDisposition); oc.SetDataTypeProperties(dataType, length, precision, scale, codePage); SetCustomPropertyToOutputColumn(MatchOutput_m.Name, lookupColumnName, "CopyFromReferenceColumn", lookupColumnName); oc.Name = String.IsNullOrEmpty(lookupColumnNameAlias) ? lookupColumnName : lookupColumnNameAlias; } else { ISInputColumn ic = new ISInputColumn(this, _input.Name, inputColumnToReplace, UsageType.UT_READWRITE); SetCustomPropertyToInputColumn(ic.Input, ic.InputColumn, "CopyFromReferenceColumn", lookupColumnName); ic.Name = String.IsNullOrEmpty(lookupColumnNameAlias) ? lookupColumnName : lookupColumnNameAlias; _renamedInputCols.Add(new string[] { inputColumnToReplace, ic.Name }); } }
public static SSISDataTypeWithProperty GetSSISDataTypeFromADONetDataType(string adoNetDataType, int dataTypeLength, int scale = 0, int precision = 0) { SSISDataType dt = SSISDataType.DT_EMPTY; int codepage = 0; int length = 0; #region conv switch (adoNetDataType.ToLower()) { case "boolean": dt = SSISDataType.DT_BOOL; break; case "char": dt = SSISDataType.DT_STR; break; case "datetime": dt = SSISDataType.DT_DBTIMESTAMP; break; case "decimal": dt = SSISDataType.DT_NUMERIC; break; case "double": dt = SSISDataType.DT_R8; break; case "guid": dt = SSISDataType.DT_GUID; break; case "int16": dt = SSISDataType.DT_I2; break; case "int32": dt = SSISDataType.DT_I4; break; case "int64": dt = SSISDataType.DT_I8; break; //SByte //single case "string": dt = SSISDataType.DT_WSTR; break; case "timespan": dt = SSISDataType.DT_DBTIME; break; case "uint16": dt = SSISDataType.DT_UI2; break; case "uint32": dt = SSISDataType.DT_UI4; break; case "uint64": dt = SSISDataType.DT_UI8; break; } #endregion if (adoNetDataType.ToLower() == "string") { length = dataTypeLength; } SSISDataTypeWithProperty sdt = new SSISDataTypeWithProperty(); sdt.DataType = dt; sdt.Length = length; if (precision != 0) { sdt.Precision = precision; } else { sdt.Precision = 0; } if (scale != 0) { sdt.Scale = scale; } else { sdt.Scale = 0; } sdt.CodePage = codepage; return(sdt); }
public ISOutputColumn AddDerivedColumn(string columnName, string expression, string expressionCols, SSISDataType dataType, int length = 0, int precision = 0, int scale = 0, int codePage = 0, RowDisposition errorRowDisposition = RowDisposition.RD_FailComponent, RowDisposition truncationRowDisposition = RowDisposition.RD_FailComponent) { if (!(String.IsNullOrEmpty(expressionCols))) { SetUsageTypeToReadForExpressionCols(expressionCols); } ISOutputColumn oc = new ISOutputColumn(this, this.GetOutputFromIndex(0).Name, columnName, errorRowDisposition, truncationRowDisposition); oc.SetDataTypeProperties(dataType, length, precision, scale, codePage); SetCustomPropertyToOutputColumn(oc.Output, oc.OutputColumn, "Expression", expression); SetCustomPropertyToOutputColumn(oc.Output, oc.OutputColumn, "FriendlyExpression", expression); return(oc); }
public void SetDataTypeProperties(SSISDataType dataType, int length, int precision, int scale, int codePage) { OutputColumn.SetDataTypeProperties(dataType, length, precision, scale, codePage); }