I'm sorry if this question has been answered already, but I've done some research and have yet to find something that makes sense.
I'm creating an SSIS script component that connects to a web service and is to dump data into a SQL table. Though the script component is still a work in progress I currently get the following error: at System.Collections.Generic.Dictionary`2.get_Item(TKey key) at ScriptMain.CreateNewOutputRows() at UserComponent.PrimeOutput(Int32 Outputs, Int32[] OutputIDs, PipelineBuffer[] Buffers, OutputNameMap OutputMap) at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.PrimeOutput(Int32 outputs, Int32[] outputIDs, PipelineBuffer[] buffers)
Here's the core of the code that I'm using for the script component:
public Dictionary<string, int> agentStatisticsColumns = new Dictionary<string, int>();
public override void CreateNewOutputRows()
{
//setSessionParameters sessionParams = new setSessionParameters();
//sessionParams.viewSettings = new viewSettings
//{
// appType = "Custom",
// forceLogoutSession = false,
// idleTimeOut = 600,
// rollingPeriod = rollingPeriod.Minutes5,
// shiftStart = 28800000,
// statisticsRange = statisticsRange.CurrentDay,
// timeZone = -25200000
//};
getStatistics statistics = new getStatistics();
statistics.statisticTypeSpecified = true;
statistics.statisticType = statisticType.AgentStatistics;
statistics.columnNames = null;
getStatisticsResponse resp = new getStatisticsResponse();
statistics statistics_return = resp.@return;
int usernameIdx = agentStatisticsColumns["Username"];
foreach (row r in statistics_return.rows)
{
Output0Buffer.Username = r.values[usernameIdx];
//string log = r.values[usernameIdx];
//Output0Buffer.Username = log;
}
}
Any help would be greatly appreciated!