Cannot obtain a DataReader from the specified data flow when DelayValidation is set to False

StackOverflow https://stackoverflow.com/questions/21262901

  •  30-09-2022
  •  | 
  •  

سؤال

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.

هل كانت مفيدة؟

المحلول

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top