title: Error :Cannot Find Table 0
body: <p>I am seeing an error regarding <code>cannot find table 0</code>, where the dataset doesn't contain the table data. This is my code to fetch rows from a table:</p>
  
  <pre><code>    DataTable dt = new DataTable();
      SqlConnection sqlconnection;
      sqlconnection = new SqlConnection(@"connectionstring");
      sqlconnection.Open();
      string sql = "Select (supplier_id,name) from supplier_info where supplier_id= '"+supplierid+"'";
      SqlCommand cmd = new SqlCommand(sql, sqlconnection);
      cmd.CommandType = CommandType.Text;
      SqlDataAdapter adpt = new SqlDataAdapter(cmd);
      DataSet dtset = new DataSet();
      adpt.Fill(dt);
      dt = dtset.Tables[0];
      DataRow dr;
      dr = dt.Rows[0];
      sqlconnection.Close();
      return dr;
  </code></pre>
  
  <p>Business logic code:</p>
  
  <pre><code>  Cust_datalogic dc = new Cust_datalogic(); //datalogic class
    DataTable dt = new DataTable();
    DataRow dr;
    dr=dc.GetSupplierInfo(id);    //method 
    Supplier_BLL bc = new Supplier_BLL();  //business logic class
    bc.Ssup_ID = dr[0].ToString();
    bc.Ssup_name = dr[1].ToString();
    return bc;
  </code></pre>