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(); }
我邮箱:[email protected] 谢谢了
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();
}
}
}
blackmeit(煤炭) 谢了