Excel Truncating DTS export -
11-16-2005
, 10:50 AM
Hi,
SQL 2000, Excel 2003
i've a dts package saved as vba package, called within a vb program,
which is exporting the results of a stored procedure into an excel
spreadsheet which already has column headings.
my problem is that only 255 characters from each field are exported,
the rest truncated into the either.
i'm the vb f the dts package the source and destination fields are set
to a decent length (ie more than 255) but still truncates.
have tried everything i can think of with no luck. can import the long
fields from excel without a problem.
can anyone help??
Example:
Public Sub oCustomTask1_Trans_Sub4(ByVal oCustomTask1 As Object)
Dim oTransformation As DTS.Transformation2
Dim oTransProps As DTS.Properties
Dim oColumn As DTS.Column
Set oTransformation =
oCustomTask1.Transformations.New("DTS.DataPumpTran sformCopy")
oTransformation.Name = "DTSTransformation__4"
oTransformation.TransformFlags = 63
oTransformation.ForceSourceBlobsBuffered = 0
oTransformation.ForceBlobsInMemory = False
oTransformation.InMemoryBlobSize = 1048576
oTransformation.TransformPhases = 4
Set oColumn =
oTransformation.SourceColumns.New("Requirement Details", 1)
oColumn.Name = "Requirement Details"
oColumn.Ordinal = 1
oColumn.Flags = 96
oColumn.Size = 3000
oColumn.DataType = 130
oColumn.Precision = 0
oColumn.NumericScale = 0
oColumn.Nullable = True
oTransformation.SourceColumns.Add oColumn
Set oColumn = Nothing
Set oColumn =
oTransformation.DestinationColumns.New("REQUIREMEN T DETAILS", 1)
oColumn.Name = "REQUIREMENT DETAILS"
oColumn.Ordinal = 1
oColumn.Flags = 102
oColumn.Size = 3000
oColumn.DataType = 130
oColumn.Precision = 0
oColumn.NumericScale = 0
oColumn.Nullable = True
oTransformation.DestinationColumns.Add oColumn
Set oColumn = Nothing
Set oTransProps = oTransformation.TransformServerProperties
Set oTransProps = Nothing
oCustomTask1.Transformations.Add oTransformation
Set oTransformation = Nothing
End Sub |