本帖最后由 aqgsh 于 2011-06-20 12:03:38 编辑

解决方案 »

  1.   

    你的配置文件写的有问题,
    还有DB_Type是怎么定义的?
      

  2.   

    在类中这样写的private static string DB_Type = ConfigurationSettings.AppSettings[ "DBType" ];
    private static string conn = ConfigurationSettings.AppSettings[ "ConnString" ];
      

  3.   

     Object dr;改为 IDataReader
      

  4.   

    dr使用DbDataReader 不好吗
    SqlDataReader和OleDbDataReader都是继承自DbDataReader ,多态
      

  5.   

    6楼的朋友fangxinggood正解,谢谢!