try
{
SqlDataAdapter da = new SqlDataAdapter("select * from WAIT_BED_PATS", sqlconnection);
DataSet ds = new DataSet();
da.Fill(ds, "WAIT_BED_PATS");
DataTable DT = ds.Tables["WAIT_BED_PATS"];
dataGridView1.DataSource = DT;
}
catch (SqlException EX)
{
MessageBox.Show(EX.Message);
}