dbTalk Databases Forums  

setting up datapump transformation in vbscript

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


Discuss setting up datapump transformation in vbscript in the microsoft.public.sqlserver.dts forum.



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

Default setting up datapump transformation in vbscript - 12-09-2003 , 09:10 AM






Hello,

I can't figure out how to set up Transformation scripts for the
DataPumpTransformation in ActiveX.

The vb code

Set oTransProps = oTransformation.TransformServerProperties

oTransProps("Text") = txtSourceCode


Always generates object does not support this method. Is it possible
to do in ActiveX or do I have to do this in VB?

Thanks in advance,

Sam G

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: setting up datapump transformation in vbscript - 12-09-2003 , 02:04 PM






Have you tried scripting out to VB and then looking to see how DTS scripts
itself out?
What are you trying to achieve?

--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Sam G" <sghaneka (AT) yahoo (DOT) com> wrote

Quote:
Hello,

I can't figure out how to set up Transformation scripts for the
DataPumpTransformation in ActiveX.

The vb code

Set oTransProps = oTransformation.TransformServerProperties

oTransProps("Text") = txtSourceCode


Always generates object does not support this method. Is it possible
to do in ActiveX or do I have to do this in VB?

Thanks in advance,

Sam G



Reply With Quote
  #3  
Old   
Sam G
 
Posts: n/a

Default Re: setting up datapump transformation in vbscript - 12-10-2003 , 09:55 AM



Basically, I wanted to create a package in vbscript that would
dynamically change the transformation based on a source text file and
a database table. I tried this syntax and things seem to work, so
thanks anyway.

Set oTransProps = oTransformation.TransformServer
Dim strCode
strCode = "Function Main()" & vbCrLf
strCode = strCode &
"DTSDestination(""PRODUCT_LINE_CD"")=DTSSource(""C OL001"")" & vbCrLf
strCode = strCode & "Main = DTSTransformStat_OK" & vbCrLf
strCode = strCode & "End Function"

oTransProps.Text= strCode
oTransProps.FunctionEntry = "Main"
oTransProps.Language = "VBScript"
oTransProps.Item("Text").Value = "Function Main()" & vbCrLf

Instead of:

Set oTransProps = oTransformation.TransformServerProperties
oTransProps("Text") = strCode

I am not sure why I the reason is though.

Sam

sghaneka (AT) yahoo (DOT) com (Sam G) wrote in message news:<fe57b32d.0312090710.3f5dbca7 (AT) posting (DOT) google.com>...
Quote:
Hello,

I can't figure out how to set up Transformation scripts for the
DataPumpTransformation in ActiveX.

The vb code

Set oTransProps = oTransformation.TransformServerProperties

oTransProps("Text") = txtSourceCode


Always generates object does not support this method. Is it possible
to do in ActiveX or do I have to do this in VB?

Thanks in advance,

Sam G

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.