谢谢

解决方案 »

  1.   

    select * from [table],恩,很通用~lz到底想问啥?
      

  2.   

    你这个问题很笼统啊。如果是数据库查询的话:
    select * from 表名 where 条件;如果是用VS2008里的新功能的话,看下linq语句

      

  3.   

    using System;
    using System.Data;
    using System.Configuration;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Web.UI.HtmlControls;
    using System.Data.OleDb;
    using System.Collections.Generic;
    using System.Windows.Forms;/// <summary>
    /// 对数据库的各种操作
    /// </summary>
    public class DAO
    {
        string str = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("test.mdb");
        OleDbConnection con;
        OleDbCommand cmd;
    public DAO()
    {
            con = new OleDbConnection(str);
    }
        //增删改的方法
        public int InsertOrDelete(string sql)
        {
            try
            {
                con.Open();
                cmd = new OleDbCommand(sql, con);
                int num = cmd.ExecuteNonQuery();
              
            }catch(Exception ex)
            {
                MessageBox.Show("程序运行繁忙,请联系管理员");  
            }
            finally
            {
                con.Close();
            }
            return num;
        
        }
        //查询的方法
        public List<object>  getShuJU(string sql)
        {
           
            con.Open();
            cmd = new OleDbCommand(sql,con);
            OleDbDataReader datareade = cmd.ExecuteReader();
            while(datareade.Read())
            {
                
                
            
            }
        
        }}
      

  4.   

    给你发过去了;
    是用VS2008写的;
    是我以前写组态软件时做的类库,支持SQL和Mysql;
    功能很全了,你可以好好研究下
      

  5.   

    可以采用IBatisNet或者参考FortuneBase参考靠地址www.cnblogs.com/mail-ricklee