dbTalk Databases Forums  

Transformation to export Table in Text file

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


Discuss Transformation to export Table in Text file in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
FedeX
 
Posts: n/a

Default Transformation to export Table in Text file - 12-19-2005 , 06:04 AM






Hi,
I am trying to write a AvtiveX to export automatically Tables in Textfiles..
I set dynamically Source (Table) and Target (a file name)..
I delete everytime existing transformation and insert a new one

Function Main()
Dim paket, task, i
Const DTSTransformFlag_AllowLosslessConversion = 512
' Objektvariable auf Paket setzen:
Set paket = DTSGlobalVariables.Parent
' Objektvariable auf DataPumpTask festlegen (Name kann über
DynamicProperties ermittelt werden)
Set task = paket.Tasks("DTSTask_DTSDataPumpTask_1").CustomTas k
' Entfernen der vorhandenen Transformationen
For i = task.Transformations.Count to 1 step - 1
task.Transformations.Remove i
Next
' Neue Transformation erstellen (s.a. Beispiel in BOL)
Set objTransform = task.Transformations.New( "DTS.DataPumpTransformCopy")
objTransform.Name = "Transform"
objTransform.TransformFlags = DTSTransformFlag_AllowLosslessConversion
task.Transformations.Add objTransform
Main = DTSTaskExecResult_Success
End Function

I get always an error

Table does not exit....

does somebody experience with this kind of situation?
I am going to appreciate any help or idea

FedeX



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.