0
當我用這個,我得到下面的異常如何使用通用的數據庫中獲取,使用企業庫中的存儲過程的參數
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.
難道還有比這個程序以外的正確途徑。
編輯
Database db = CustomDbFactory.CreateDataBase(connStrName);
DbCommand command = db.DbProviderFactory.CreateCommand();
command.CommandText = @spName;
command.CommandType = CommandType.StoredProcedure;
db.DiscoverParameters(command);
...
如果您提供的代碼和配置我們可能會幫助 – 2011-12-21 13:27:56
請編輯您的原始帖子並在其中提供代碼和配置。把它放在評論中是沒有用的。 – 2011-12-21 14:39:23
@JasonMeckley:完成編輯問題以添加參考碼 – Saravanan 2011-12-22 04:29:23