1、用什么好,是自己写类直接执行好呢,还是用vs2008带的DataSet好呢?
2、增、删、改、查,包括分页,哪位能提供一个例子?本人新用asp.net不久的,请大家多多指教!送上 100分,以表谢意。

解决方案 »

  1.   

    http://hi.baidu.com/shuwang/blog/item/7f5962609b38ad44ebf8f8ed.html
      

  2.   

    新手用DataSet好。分页用 linq to DataSet
      

  3.   


     using system; 
      using system.data.oledb; 
       
     public class oledbtest{ 
       
      public static void main() 
      { 
      //创建数据库连接 
      oledbconnection aconnection = new oledbconnection("provider=microsoft.jet.oledb.4.0;data source=c:\\db1.mdb"); 
       
      //创建command对象并保存sql查询语句 
      oledbcommand acommand = new oledbcommand("select * from emp_test", aconnection); 
      try 
      { 
      aconnection.open(); 
       
      //创建datareader 对象 
      oledbdatareader areader = acommand.executereader(); 
      console.writeline("this is the returned data from emp_test table"); 
       
      //循环遍历数据库 
      while(areader.read()) 
      { 
      console.writeline(areader.getint32(0).tostring()); 
      } 
       
      //关闭reader
      areader.close(); 
       
      //关闭连接
      aconnection.close(); 
      } 
       
      //异常处理 
      catch(oledbexception e) 
      { 
      console.writeline("error: {0}", e.errors[0].message); 
      } 
      } 
      } 
      

  4.   

    记得03的MSDN上有示例文档的,08的没看过,但是应该也有的吧