NotSupportedException - Parameter discovery is not supported...etc

Topics: Data Access Application Block, Enterprise Library Core
Nov 11, 2009 at 2:44 PM
Edited Nov 11, 2009 at 2:45 PM

Hello Everybody,

i'm trying to execute a query like this: "SELECT column_name FROM table_name WHERE table_col LIKE '%" + value + "%'";

but i get this error:"Parameter discovery is not supported for connections using GenericDatabase. You must specify the parameters explicitly, or configure the connection to use a type deriving from Database that supports parameter discovery."

what does that mean?

 

thank you

Nov 12, 2009 at 2:37 AM

I suppose you configured a data provider in your config that doesn't have a corresponding Database class implementation in entlib that's why you're getting an instance of GenericDatabase. It is not supported as there is no generic way to do it.  You can also refer here - http://blogs.msdn.com/tomholl/archive/2005/09/14/466298.aspx (Generic Database section).

 

Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com