如题。

解决方案 »

  1.   

    希望高手能给个比较详细的代码
    我邮箱:[email protected]   谢谢了 
      

  2.   

    using System;
    using System.Data;
    using System.Configuration;
    using System.Collections;
    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.SqlClient;public partial class Default11 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            ArrayList l = new ArrayList();
            SqlConnection sc = new SqlConnection("Data Source=MEITMEI\\SQLEXPRESS;Initial Catalog=meit;Integrated Security=True");
            SqlCommand command = new SqlCommand("select a from a",sc);
            try
            {
                sc.Open();
                SqlDataReader dr = command.ExecuteReader();
                while (dr.Read())
                    l.Add(dr.ToString());
            }
            finally
            {
                sc.Close();
            }
            
        }
    }
      

  3.   

    问题已解决!
     
     blackmeit(煤炭)  谢了