ActiveX and DTS package variables

ActiveX and DTS package variables

Post by Jim Trowbridg » Wed, 17 Apr 2002 16:03:11



If I execute a DTS step from DTS designer, to set package
properties using an ActiveX script, it works no probs.

If I execute that step by running the whole package from
the GO button, then that step fails with this error
Step 'DTSStep_DTSActiveScriptTask_1' failed

Step Error Source: Microsoft Data Transformation Services
(DTS) Package
Step Error Description:Need to run the object to perform
this operation
 (Microsoft Data Transformation Services (DTS) Package
(80004005): Code execution exception:  
EXCEPTION_ACCESS_VIOLATION)
Step Error code: 80040005
Step Error Help File:sqldts80.hlp
Step Error Help Context ID:1100

This comes from code that sets task properties in the
package, but I can set properties that belong the the DTS
package parent object !!??

 
 
 

ActiveX and DTS package variables

Post by Darren Gree » Thu, 18 Apr 2002 03:18:33




Quote:>If I execute a DTS step from DTS designer, to set package
>properties using an ActiveX script, it works no probs.

>If I execute that step by running the whole package from
>the GO button, then that step fails with this error

>Step 'DTSStep_DTSActiveScriptTask_1' failed

>Step Error Source: Microsoft Data Transformation Services
>(DTS) Package
>Step Error Description:Need to run the object to perform
>this operation
> (Microsoft Data Transformation Services (DTS) Package
>(80004005): Code execution exception:
>EXCEPTION_ACCESS_VIOLATION)
>Step Error code: 80040005
>Step Error Help File:sqldts80.hlp
>Step Error Help Context ID:1100

>This comes from code that sets task properties in the
>package, but I can set properties that belong the the DTS
>package parent object !!??

Is on of those tasks a VB custom task, such as the OLAP proc task?
Set the ActX task to execute on main thread (Right-click, workflow
properties). Always set this for any tasks that even think of touching
VB.

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

 
 
 

ActiveX and DTS package variables

Post by Jim Trowbridg » Thu, 18 Apr 2002 08:27:43


That was a winning reply !
It certainly fixed the problem. We were updating a package that included
OLAP steps, using ActiveX VB code.
Strangely, it would allow us to update some package properties even
without this option. I suspect the reason is that the properties we
could update were associated with the DTS package parent object, as the
properties that failed were all associated with OLAP task properties.

However, I am not a programmer, nor do I know too much about DTS.

If you say that all VB steps should have this option set, is there a way
to make it the default ?
Would this behave differently if we limited the number of concurrent
threads for the package, or is a spawned object separate.

Jim Trowbridge
DBA

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

 
 
 

ActiveX and DTS package variables

Post by Darren Gree » Fri, 19 Apr 2002 03:27:57




Quote:>That was a winning reply !
>It certainly fixed the problem. We were updating a package that included
>OLAP steps, using ActiveX VB code.
>Strangely, it would allow us to update some package properties even
>without this option. I suspect the reason is that the properties we
>could update were associated with the DTS package parent object, as the
>properties that failed were all associated with OLAP task properties.

That's right, the OLAP task is the problem, so the other Pkg stuff will
be fine.

Quote:>However, I am not a programmer, nor do I know too much about DTS.

>If you say that all VB steps should have this option set, is there a way
>to make it the default ?

The task itself will be set correctly, it is the other task like this
that "touch" the VB task that you will have to do yourself.

Quote:>Would this behave differently if we limited the number of concurrent
>threads for the package, or is a spawned object separate.

Limiting it to 1 makes a certain amount of sense, but I really don't
understand threading properly and how DTS uses it.

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

 
 
 

1. Accessing global DTS package variables from SQL code in a DTS task

Hello.

I'd like to know whether it is possible to access the DTS package
global variables from SQL code within this package.
Example : say I define a global variable Path in my DTS package, and I
initialize it when I run the package (DTSGlobalVariables("Path") =
"MyPath"). Next, I'd like to get this variable's value in a SQL script
I use in DTS. I create some SQL task, write my code in it, but... How

Thanks in advance for your answers.
Patrick.

2. Update Using SQLDA (fwd)

3. Extracting log information for DTS Packages, Steps, and Error in a ActiveX Script

4. OH-Cleveland-1495--Visual Basic-Instructor

5. INSERT Trigger for an ActiveX DTS package

6. Database Lock.

7. DTS Package call from ActiveX DLL

8. Sybperl

9. DTS , looping and failure of one ActiveX Task causing the Package to Stop

10. DTS Package and ActiveX DLL

11. Saving a DTS package from within an ActiveX script

12. Schedule DTS package ActiveX CreateObject Permission Denied

13. DTS Package ActiveX Script Success/ Failure