//write a store procedure to fetch data
if you need to fetch the data's from more than one table use joins
//To fill a dataset
SqlConnection con =new SqlConnection("");
SqlCommand cmd =new SqlCommand("sp name",con);
cmd.CommandTye=commandType.StoredProcedure;
SqlDataAdapter da=new SqlDataAdapter(cmd);
Dataset ds=new Dataset();
da.Fill(ds);