I have a problem in trying to replicate a bit of functionality from the following bit of code:
TaskHost thEST = exEST as TaskHost;
ExecuteSQLTask execSqlTask = thEST.InnerObject as ExecuteSQLTask;
execSqlTask.BypassPrepare = false;
In the source project I have pulled this from, the code runs fine. In my application it fails at "execSqlTask.BypassPrepare = false;", with an Object Reference not set error.
Tracking down differences, this seems to be because in my version of the code, instead of thEST getting assigned as "Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.ExecuteSQLTask", it is "System.__ComObject".
I checked the references to Microsoft.SqlServer.SQLTask and they are identical except my version of it has 2 additional properties - SpecificVersion and EmbedInteropTypes, both of which are set to False. Adjusting these seems to either break the code or
not fix things.
At this point I am at the limit of my (already limited) C# knowledge... anybody have a clue?
Cheers, JamesJames Beresford @ www.bimonkey.com
SSIS / MSBI Consultant in Sydney, Australia
SSIS ETL Execution Control and Management Framework @
SSIS ETL Framework on Cod
View Complete Post