企业库如何使用数据读取器...? [英] Enterprise Library How to user datareader....?

查看:92
本文介绍了企业库如何使用数据读取器...?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

using (IDataReader dr = objSqlDb.ExecuteReader(objDbCmd))
              {
                  // Do Something...

              }





引发异常:


无法加载文件或程序集``Microsoft.Practices.Unity,Version = 2.0.414.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35''或其依赖项之一.系统找不到指定的文件.





throws an exception :


Could not load file or assembly ''Microsoft.Practices.Unity, Version=2.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'' or one of its dependencies. The system cannot find the file specified.

推荐答案

该错误说明了您应该执行的操作:

-确保Microsoft.Practices.Unity.dll存在于您正在运行的代码旁边,例如在bin文件夹中.

-如果不在GAC中,请尝试在其中添加.
The error explains what you should do:

- Makes sure Microsoft.Practices.Unity.dll exists beside the code you are running e.g. in the bin folder.

- If it is not in the GAC try adding it there.


这篇关于企业库如何使用数据读取器...?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆