Reputation: 534
I am trying to read package variables in a custom PipelineComponent
public override void PreExecute()
{
IDTSVariable100 vars2 = null;
VariableDispenser.LockForRead("System::databse");
VariableDispenser.GetVariables(out vars2);
}
VariableDispenser.GetVariables(out vars2) gives me error that
"The best overloaded method match for
"Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSVariableDispenser100.GetVariables(out Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSVariables100)'
has some invalid argument.
Upvotes: 0
Views: 868
Reputation: 5132
Well, apart from the fact that the IDTSVariableDispenser100
interface is one of those APIs that "supports the SQL Server infrastructure and is not intended to be used directly from your code", you've declared vars2
to be of the wrong type. The IDTSVariableDispenser100.GetVariables method takes an out
parameter of type IDTSVariables100
, not IDTSVariable100
. (Note the "s".)
Upvotes: 1