title: Java, looping through result set
body: <p>In Java, I have a query like this:</p>
  
  <pre><code>String querystring1= "SELECT rlink_id, COUNT(*)"
                     + "FROM dbo.Locate  "
                     + "GROUP BY rlink_id ";
  </code></pre>
  
  <p>The table rlink_id has this data:</p>
  
  <pre><code>Sid        lid
   3           2
   4           4
   7           3
   9           1
  </code></pre>
  
  <p>How do I extract these values with a Java ResultSet?</p>
  
  <p>Here is what I have so far:</p>
  
  <pre><code>String show[] = {rs4.getString(1)};
  String actuate[] = {rs4.getString(2)};
  asString = Arrays.toString(actuate);
  </code></pre>