Activation error occured while trying to get instance of type IQuery

Topics: Development Team Discussion, User Discussion
Jun 21, 2012 at 12:17 PM

Hi,

   I am using Query Application Block and my code is successfully compiled.

   I am getting the following error "Activation error occured while trying to get instance of type IQuery, key "Sample Data Query" in below line at run time.

IQuery query = EnterpriseLibraryContainer.Current.GetInstance<IQuery>("Sample Data Query");

Sample Data Query is my data query name.

I am able to connect to database by below line.

Database db = EnterpriseLibraryContainer.Current.GetInstance<Database>("OracleConnectionString");

Please help me out of this problem.

Thanks,

Sowjanya