dbTalk Databases Forums  

Excel Truncating DTS export

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Excel Truncating DTS export in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ho66es@hotmail.com
 
Posts: n/a

Default 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


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.