Sunday, March 25, 2012

activeX step never finishes.

I have an activex script which executes a query that never finishes. If I recompile the query in Management Studio before I run this step, then the step will *usually* work fine. This is the last step in a very long update process so the data has changed a great deal when this step executes.

The query always works fine in Management studio btw.

I am using BI studio to run the package.

I have tried placing a step before this that marks the query for recompilation but that doesnt seem to work. Any ideas how to resolve this?

Why ActiveX?|||it loops through the result set and sends out an email for each record. The package was originally a dts 2000 package so I just kept it as is. If theres a better way to do this in SSIS I would love to know.|||Use an Execute SQL task to populate an object-typed variable. Hook the SQL task to a Foreach loop which "shreds" the variable. Inside that foreach loop you could use a Send Mail task.

See if this helps: http://blogs.conchango.com/jamiethomson/archive/2005/07/04/SSIS-Nugget_3A00_-Execute-SQL-Task-into-an-object-variable-_2D00_-Shred-it-with-a-Foreach-loop.aspx

No comments:

Post a Comment