string Connstring="......";
string SqlString="......."
SqlConnection Conn=new SqlConnection(Connstring);
SqlDataAdapter MyCommand=new SqlDataAdapter(SqlString,Conn) ;
DataSet ds=new DataSet();
MyCommand.Fill(ds,"infoTable");
ResultSetView=new DataView();
ResultSetView=ds.Tables["infoTable"].DefaultView;
string d;
d=ResultSetView["字段"].ToString();
//i是表示第几条记录,可用ResultSetView.Count得到记录条数。然后用循环依次取出就可以了