Question

I am using SSIS 2012 with SSDT and VS 2012.

I'm getting the error : "Could not obtain a DataReader object from the specified data flow component." when trying to dtsCommand.ExecuteReader(CommandBehavior.Default) on every package I create. I am sure that the property DelayValidation is set to False on flow task and its parent and ValidateExternalMetadata is set to True on DataReader.

When the package is executed using the dtsCommand.ExecuteNonQuery();, it returns 0 after 30 secs (the default timeout), so it seems that everything is fine with it.

The C# code is coming from BOL http://msdn.microsoft.com/en-us/library/ms135917.aspx

Any help? Thank you.

Was it helpful?

Solution

A detail was missing from my question, I was running the C# code inside an unit test with R#. It seems that there is a problem with it. I tried to execute the code from a console application and everything went fine at the first time.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top