用SqlDataReader也可以
string sql6="select top 3 title,id from SD_Activity order by intime desc";
SqlConnection myConnection=new SqlConnection(数据库连接字符);
SqlCommand myCommand=new SqlCommand(sql6,myConnection);
myConnection.Open();
SqlDataReader dr=myCommand.ExcuteReader();
dr.Read();
Label1.Text=dr["title"].tostring();
dr.Read();
Label2.Text=dr["title"].tostring();
dr.Read();
Label3.Text=dr["title"].tostring();
dr.Close();
myConnection.Close();
[此贴子已经被作者于2007-5-21 23:54:00编辑过]