The dataset you are using is empty, because you are using wrong approach to load data into the dataset, to load data into dataset see this example:
First connect to the database you are working on:
Assuming it is sql server database.
string strCon = "Data source = yourDataSource; Initial Catalog = DatabaseName; Integrated Security = SSPI;";
SqlConnection Conn = new SqlConnection(strCon);
string strCmd = "select * from Company;";
SqlDataAdapter sda = new SqlDataAdapter(strCmd, Conn);
DataSet ds = new DataSet();
sda.Fill(ds);
foreach (DataRow dr in ds.Tables[0].Rows)
{
Console.WriteLine(dr["compName"]);
}