dbTalk Databases Forums  

What am I doing wrong...

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


Discuss What am I doing wrong... in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Hans [DiaGraphIT]
 
Posts: n/a

Default What am I doing wrong... - 11-17-2005 , 12:49 PM






Hi!

Following code works just fine, until the global variable is set to true

Function Main()
Dim oPkg

Set oPkg = DTSGlobalVariables.Parent

If DTSGlobalVariables("UPGRADE").Value Then
oPkg.Steps("DTSStep_SQLExecuteSQLTask_2").Value =DTSStepExecStat_Inactive
oPkg.Steps("DTSStep_SQLExecuteSQLTask_4").Value =DTSStepExecStat_Inactive
oPkg.Steps("DTSStep_SQLExecuteSQLTask_5").Value =DTSStepExecStat_Inactive
End If

Set oPkg = Nothing

Main = DTSTaskExecResult_Success
End Function

I've also tried the link http://www.sqldts.com/?214 without understanding
how it works. Forgive me for my ignorance, but what am I missing / doing
wrong. Please help me. Any help appreciates.

---------------
Best regards
- Hans -
---------------


Reply With Quote
  #2  
Old   
fleo
 
Posts: n/a

Default RE: What am I doing wrong... - 11-17-2005 , 02:05 PM






Maybe you should try:
If DTSGlobalVariables("UPGRADE").Value = "True"

Another thing you could try to debug is replace the code in the middle and
see if it works:
If DTSGlobalVariables("UPGRADE").Value Then
MsgBox "This works."
End if


"Hans [DiaGraphIT]" a écrit :

Quote:
Hi!

Following code works just fine, until the global variable is set to true

Function Main()
Dim oPkg

Set oPkg = DTSGlobalVariables.Parent

If DTSGlobalVariables("UPGRADE").Value Then
oPkg.Steps("DTSStep_SQLExecuteSQLTask_2").Value =DTSStepExecStat_Inactive
oPkg.Steps("DTSStep_SQLExecuteSQLTask_4").Value =DTSStepExecStat_Inactive
oPkg.Steps("DTSStep_SQLExecuteSQLTask_5").Value =DTSStepExecStat_Inactive
End If

Set oPkg = Nothing

Main = DTSTaskExecResult_Success
End Function

I've also tried the link http://www.sqldts.com/?214 without understanding
how it works. Forgive me for my ignorance, but what am I missing / doing
wrong. Please help me. Any help appreciates.

---------------
Best regards
- Hans -
---------------


Reply With Quote
  #3  
Old   
Hans [DiaGraphIT]
 
Posts: n/a

Default RE: What am I doing wrong... - 11-17-2005 , 04:36 PM



Sorry I didn't make my self understood

According to the link http://www.sqldts.com/?214 It shows how to skip a
single task. What I want to do is if UPGRADE is set to true I want to jump
over several tasks or jump to a spesific task and continue from there.

Please help...

--
---------------
Best regards
- Hans -
---------------


"fleo" wrote:

Quote:
Maybe you should try:
If DTSGlobalVariables("UPGRADE").Value = "True"

Another thing you could try to debug is replace the code in the middle and
see if it works:
If DTSGlobalVariables("UPGRADE").Value Then
MsgBox "This works."
End if


"Hans [DiaGraphIT]" a écrit :

Hi!

Following code works just fine, until the global variable is set to true

Function Main()
Dim oPkg

Set oPkg = DTSGlobalVariables.Parent

If DTSGlobalVariables("UPGRADE").Value Then
oPkg.Steps("DTSStep_SQLExecuteSQLTask_2").Value =DTSStepExecStat_Inactive
oPkg.Steps("DTSStep_SQLExecuteSQLTask_4").Value =DTSStepExecStat_Inactive
oPkg.Steps("DTSStep_SQLExecuteSQLTask_5").Value =DTSStepExecStat_Inactive
End If

Set oPkg = Nothing

Main = DTSTaskExecResult_Success
End Function

I've also tried the link http://www.sqldts.com/?214 without understanding
how it works. Forgive me for my ignorance, but what am I missing / doing
wrong. Please help me. Any help appreciates.

---------------
Best regards
- Hans -
---------------


Reply With Quote
  #4  
Old   
mattb
 
Posts: n/a

Default RE: What am I doing wrong... - 11-21-2005 , 01:35 PM





"Hans [DiaGraphIT]" wrote:

Quote:
Sorry I didn't make my self understood

According to the link http://www.sqldts.com/?214 It shows how to skip a
single task. What I want to do is if UPGRADE is set to true I want to jump
over several tasks or jump to a spesific task and continue from there.

Please help...

--
---------------
Best regards
- Hans -
---------------


"fleo" wrote:

Maybe you should try:
If DTSGlobalVariables("UPGRADE").Value = "True"

Another thing you could try to debug is replace the code in the middle and
see if it works:
If DTSGlobalVariables("UPGRADE").Value Then
MsgBox "This works."
End if


"Hans [DiaGraphIT]" a écrit :

Hi!

Following code works just fine, until the global variable is set to true

Function Main()
Dim oPkg

Set oPkg = DTSGlobalVariables.Parent

If DTSGlobalVariables("UPGRADE").Value Then
oPkg.Steps("DTSStep_SQLExecuteSQLTask_2").Value =DTSStepExecStat_Inactive
oPkg.Steps("DTSStep_SQLExecuteSQLTask_4").Value =DTSStepExecStat_Inactive
oPkg.Steps("DTSStep_SQLExecuteSQLTask_5").Value =DTSStepExecStat_Inactive
End If

Set oPkg = Nothing

Main = DTSTaskExecResult_Success
End Function

I've also tried the link http://www.sqldts.com/?214 without understanding
how it works. Forgive me for my ignorance, but what am I missing / doing
wrong. Please help me. Any help appreciates.

---------------
Best regards
- Hans -
---------------

Simpley change your workflow to Success (green arrow) to a task if OK and on
failure to another task or even on failure close package.


Reply With Quote
  #5  
Old   
Hans [DiaGraphIT]
 
Posts: n/a

Default RE: What am I doing wrong... - 11-23-2005 , 11:58 PM




--
---------------
Best regards
- Hans -
---------------


"mattb" wrote:

Quote:

"Hans [DiaGraphIT]" wrote:

Sorry I didn't make my self understood

According to the link http://www.sqldts.com/?214 It shows how to skip a
single task. What I want to do is if UPGRADE is set to true I want to jump
over several tasks or jump to a spesific task and continue from there.

Please help...

--
---------------
Best regards
- Hans -
---------------


"fleo" wrote:

Maybe you should try:
If DTSGlobalVariables("UPGRADE").Value = "True"

Another thing you could try to debug is replace the code in the middle and
see if it works:
If DTSGlobalVariables("UPGRADE").Value Then
MsgBox "This works."
End if


"Hans [DiaGraphIT]" a écrit :

Hi!

Following code works just fine, until the global variable is set to true

Function Main()
Dim oPkg

Set oPkg = DTSGlobalVariables.Parent

If DTSGlobalVariables("UPGRADE").Value Then
oPkg.Steps("DTSStep_SQLExecuteSQLTask_2").Value =DTSStepExecStat_Inactive
oPkg.Steps("DTSStep_SQLExecuteSQLTask_4").Value =DTSStepExecStat_Inactive
oPkg.Steps("DTSStep_SQLExecuteSQLTask_5").Value =DTSStepExecStat_Inactive
End If

Set oPkg = Nothing

Main = DTSTaskExecResult_Success
End Function

I've also tried the link http://www.sqldts.com/?214 without understanding
how it works. Forgive me for my ignorance, but what am I missing / doing
wrong. Please help me. Any help appreciates.

---------------
Best regards
- Hans -
---------------


Simpley change your workflow to Success (green arrow) to a task if OK and on
failure to another task or even on failure close package.
Thank you mattb !


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.