最简单的例子 SqlConnection con = new SqlConnection("你的困困谈连接字汪碰符串");
SqlCommand com = new SqlCommand("SQL查询语句", con);
con.Open();
SqlDataReader dr = com.ExecuteReader();
while (dr.Read())
{
Response.Write(dr["尺让字段1"].ToString(); ……
} con.Close();
http://gostlili.blog.163.com/blog/static/116627143200991503524398/