title: How to access values stored in a dataset in VB?
body: <p>So i have a DB with 3 tables. <strong>User</strong> Table with <code>U_ID</code> and <code>U_Name</code>, <strong>Class</strong> with <code>C_ID</code>, and <code>C_Name</code> and <strong>User_Class</strong> Table with <code>U_ID</code> and <code>C_ID</code>. Foreign keys are set.</p>
  
  <p>I want to display the classes associated with the selected user. The user is identified by their name. I know these are the two SQL statements I need to execute:</p>
  
  <pre><code>SELECT U_ID FROM User WHERE U_Name = current_U_name
  </code></pre>
  
  <p>then</p>
  
  <pre><code>SELECT C_ID FROM User_Class WHERE U_ID = current_U_ID
  </code></pre>
  
  <p>then</p>
  
  <pre><code>SELECT C_Name FROM Class WHERE C_ID = C_IDforAllMatchingRows
  </code></pre>
  
  <p>I wanted to use a dataset to store the results of each statement but I could not figure out how to access one value in the dataset i.e.</p>
  
  <p><code>(SELECT C_ID FROM User_Class WHERE U_ID = *dataset.Tables(0).Column(0)*)</code>  - does not work</p>
  
  <p>I started using gridviews because i could access the values stored in each cell like above. </p>
  
  <p>I must be missing a simple way to retrieve the information i need from these three simple tables. </p>
  
  <p>Any help is appreciated, thanks</p>