dbTalk Databases Forums  

Strange error message on Custom Task

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


Discuss Strange error message on Custom Task in the microsoft.public.sqlserver.dts forum.



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

Default Strange error message on Custom Task - 05-18-2004 , 06:16 AM






Thanks to a lot of help and time put in by Allen, ive managed to get to the stage where i have an ActiveX task setting the properties for a custom task ( written in VB 6 ).

The cystom task is set to disabled, and im using the ActiveX task to set the thw file names and set the step te disabled = false. In the DTS designer i right hand click the ActiceX task an execute step with no errors. After checking the properties of my custom task i can see that the file names have been set and the disable step is no checked. However when i try and execute the DTS i get the following error on the ActiveX task at tthe point it tries to set the 1st file nam

execption_Access_violatio

the activex task is as follow

Function Main(
' select type of file and enable the tasks as require
dim pk
dim ts
dim stpSetTas
dim stpCustDll

set pkg = DTSGlobalVariables.Paren
set stpSetTask = pkg.Steps("DTSStep_DTSActiveScriptTask_7")
set stpCustDll = pkg.steps("DTSStep_ConvertFileForSQL.ClsConvert_1"
set tsk = DTSGlobalVariables.Parent.Tasks("DTSTask_ConvertFi leForSQL.ClsConvert_1"

tsk.Properties("OrigionalFileName").Value = DTSGlobalVariables("gv_FileFullName").Valu
tsk.Properties("NewOutputFileName").Value = DTSGlobalVariables("gv_TempFile").Valu

stpCustDll.DisableStep = Fals
stpSetTask.DisableStep = Fals
stpCustDll.ExecutionStatus = DTSStepExecStat_Waitin

Main = DTSTaskExecResult_Succes

End Functio

Any pointers on where to look ?

Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: Strange error message on Custom Task - 05-18-2004 , 07:05 AM






Make sure the ActiveX Script Task is set to execute on main thread, as found
on the same sheet as the Disable Step option.


--
Darren Green
http://www.sqldts.com

"Peter Newman" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Thanks to a lot of help and time put in by Allen, ive managed to get to
the stage where i have an ActiveX task setting the properties for a custom
task ( written in VB 6 ).
Quote:
The cystom task is set to disabled, and im using the ActiveX task to set
the thw file names and set the step te disabled = false. In the DTS designer
i right hand click the ActiceX task an execute step with no errors. After
checking the properties of my custom task i can see that the file names have
been set and the disable step is no checked. However when i try and execute
the DTS i get the following error on the ActiveX task at tthe point it tries
to set the 1st file name
Quote:
execption_Access_violation

the activex task is as follows

Function Main()
' select type of file and enable the tasks as required
dim pkg
dim tsk
dim stpSetTask
dim stpCustDll

set pkg = DTSGlobalVariables.Parent
set stpSetTask = pkg.Steps("DTSStep_DTSActiveScriptTask_7")
set stpCustDll = pkg.steps("DTSStep_ConvertFileForSQL.ClsConvert_1" )
set tsk =
DTSGlobalVariables.Parent.Tasks("DTSTask_ConvertFi leForSQL.ClsConvert_1")

tsk.Properties("OrigionalFileName").Value =
DTSGlobalVariables("gv_FileFullName").Value
tsk.Properties("NewOutputFileName").Value =
DTSGlobalVariables("gv_TempFile").Value

stpCustDll.DisableStep = False
stpSetTask.DisableStep = False
stpCustDll.ExecutionStatus = DTSStepExecStat_Waiting

Main = DTSTaskExecResult_Success

End Function

Any pointers on where to look ?



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.