0

When i use this, i get the following exception

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.

Is there a right way other than this procedure.

EDIT

Database db = CustomDbFactory.CreateDataBase(connStrName); 
DbCommand command = db.DbProviderFactory.CreateCommand(); 
command.CommandText = @spName; 
command.CommandType = CommandType.StoredProcedure; 
db.DiscoverParameters(command); 
...
Saravanan
  • 7,637
  • 5
  • 41
  • 72

1 Answers1

0

This feature is supported only the SqlDatabase objects only. Hence, instead of calling the DiscoverParameters on a GenericDatabase, I had to call it from a SqlDatabase.. Specifics Issue.

Saravanan
  • 7,637
  • 5
  • 41
  • 72