相关文章  
  • 使用C#进行点对点通讯和文件传输
  • C#进行点对点通讯和文件传输(通讯基类部分)
  • MapObjects2.2 在C#中的应用(动态加载地图)
  • 获取配置文件中configSections的配置信息
  • 彻底探索计算机变慢10大原因
  • 高级Windows 2000 Rootkit检测技术
  • 虚拟主机探虚实
  • “Windows优化大师”应用三忌
  • 20例Windows XP操作系统优化技巧
  • 高效的数据仓库管理设计以及所需注意事项
  •   推荐  
      科普之友首页   专利     科普      动物      植物        天文   考古   前沿科技
     您现在的位置在:  首页 >>文献 >>培训

    C#对底层数据操作的通用类逐个剖析7

    Sqlstr">SQL语句
       ///
       public object ExecWithValue(String Sqlstr)
       {
        object result=null;
        _connection.Open();
        SqlCommand myCommand = new SqlCommand(Sqlstr, _connection);
        try
        {
        result=myCommand.ExecuteScalar();
        }
        catch (SqlException exc)
        {
        DebugBox db = new DebugBox(Sqlstr + "\r\n" + exc.ToString());
        db.Show();
        //MessageBox.Show(exc.Message);
        }
        _connection.Close();
        return result;
       }
      
       ///
       /// 返回相应的行数
       ///

       /// SQL语句
       /// 行数
       public int Exec(String Sqlstr)
       {
        int sucess=0;   
        SqlCommand myCommand = new SqlCommand(Sqlstr, _

    页码:[1] [2] [3] [4] [5] [6] [7] [8] [9]7页、共9页

         

          设为首页       |       加入收藏       |       广告服务       |       友情链接       |       版权申明      

    Copyriht 2007 - 2008 ©  科普之友 All right reserved