hi
SqlConnection cs1 = new SqlConnection("Data Source=nemesisfc; Initial Catalog=FreezerTemps; Integrated Security=TRUE");
SqlCommand cmd1 = new SqlCommand();
cs1.Open();
cmd1.CommandText = "write ur sql select query here";
DataSet dtst = new DataSet();
SqlDataAdapter dp = new SqlDataAdapter(cmd1);
dp.Fill(dtst);
cs1.Close();
this will help