dbTalk Databases Forums  

VBScripts or JScripts

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


Discuss VBScripts or JScripts in the microsoft.public.sqlserver.dts forum.



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

Default VBScripts or JScripts - 05-06-2004 , 01:40 PM







I need to have a VBScripts or JScripts that retrieves DTS information and
stores the information on global variables. For example, I want to retrieve
information like step name, number of rows that have been transferred, error
code & error message if an error was encountered, etc...

Can someone give me some sample code, or direct me to places where I can
obtain sample code.

Thanks in advance

David.



Reply With Quote
  #2  
Old   
David N
 
Posts: n/a

Default Re: VBScripts or JScripts - 05-06-2004 , 03:57 PM






I see that there is a DTSGlobalVariables("xxxx").Value that I can use. For
example

SET a = DTSGlobalVariables("TransferFileName").Value

The problem is: I cannot find any document that gives me a list of
pre-defined global DTS variables.

Where can I find a list of predefined DTS variables that can be used in my
ActiveX scripts?

Thanks.

" David N" <dq.ninh (AT) netiq (DOT) com> wrote

Quote:
I need to have a VBScripts or JScripts that retrieves DTS information and
stores the information on global variables. For example, I want to
retrieve
information like step name, number of rows that have been transferred,
error
code & error message if an error was encountered, etc...

Can someone give me some sample code, or direct me to places where I can
obtain sample code.

Thanks in advance

David.





Reply With Quote
  #3  
Old   
Michael Cheng [MSFT]
 
Posts: n/a

Default RE: VBScripts or JScripts - 05-07-2004 , 12:57 AM



Hi David,

From your descriptions, I understand that you would like to find some
sampel code in VB, which will show you how to get information for ActiveX
scripts. Have I understood you? If there is anything I misunderstood, don't
hesitate to let me know.

Based on my knowledge, Global variables that do not exist when first
referenced during Data Transformation Services (DTS) package execution are
created at that time. Prior to package execution, you can create global
variables explicitly by adding a GlobalVariable object to the package.

Here are the basic steps for creating a global variable in a DTS package
prior to package execution:
1. Use the New method of the GlobalVariables collection of the Package2
object.
2. Set the Value property of the created GlobalVariable object to the
initial value of the global variable.
3. Add the object to the package with the Add method of the GlobalVariables
collection.

Moreover, I think the following document will be helpful as they show you
how to use ActiveX scripts in DTS

Using ActiveX Scripts in DTS
http://msdn.microsoft.com/library/de...us/dtssql/dts_
addf_misc_68tv.asp

Using Global Variables with DTS Packages
http://msdn.microsoft.com/library/de...us/dtssql/dts_
addf_misc_68tv.asp

More detailed information about global variables in DTS packages, could be
found at MSDN Online, or Books Online (with topic "Creating DTS Packages in
Visual Basic")

Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are here to be of assistance!

Sincerely yours,

Michael Cheng
Microsoft Online Support
************************************************** *********
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks.


Reply With Quote
  #4  
Old   
Michael Cheng [MSFT]
 
Posts: n/a

Default RE: VBScripts or JScripts - 05-07-2004 , 12:57 AM



Hi David,

From your descriptions, I understand that you would like to find some
sampel code in VB, which will show you how to get information for ActiveX
scripts. Have I understood you? If there is anything I misunderstood, don't
hesitate to let me know.

Based on my knowledge, Global variables that do not exist when first
referenced during Data Transformation Services (DTS) package execution are
created at that time. Prior to package execution, you can create global
variables explicitly by adding a GlobalVariable object to the package.

Here are the basic steps for creating a global variable in a DTS package
prior to package execution:
1. Use the New method of the GlobalVariables collection of the Package2
object.
2. Set the Value property of the created GlobalVariable object to the
initial value of the global variable.
3. Add the object to the package with the Add method of the GlobalVariables
collection.

Moreover, I think the following document will be helpful as they show you
how to use ActiveX scripts in DTS

Using ActiveX Scripts in DTS
http://msdn.microsoft.com/library/de...us/dtssql/dts_
addf_misc_68tv.asp

Using Global Variables with DTS Packages
http://msdn.microsoft.com/library/de...us/dtssql/dts_
addf_misc_68tv.asp

More detailed information about global variables in DTS packages, could be
found at MSDN Online, or Books Online (with topic "Creating DTS Packages in
Visual Basic")

Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are here to be of assistance!

Sincerely yours,

Michael Cheng
Microsoft Online Support
************************************************** *********
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks.


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.