title: Multiple ResultSets, different queries, same database SQLSERVER
body: <p>Using JDBC driver, how can I use multiple result sets from different queries without continually opening and closing the connections, as it stand im extracting w.e I need and passing it to another method. Each time opening a new conn,statement and resultset</p>
  
  <pre><code>public static void OppQuery() {
      Connection conn = null;
      Statement stmt = null;
      ResultSet result_set = null;
      try {
          Class.forName(JDBC_DRIVER);
          conn = DriverManager.getConnection(DB_URL);
          stmt = conn.createStatement();
  
          String emailInfoQuery = "FROM WHERE";
  }
  
  
  public static void addQuery(String latestRenewalId) {
      Connection conn = null;
      Statement stmt = null;
      ResultSet result_set = null;
      try {
          Class.forName(JDBC_DRIVER);
          conn = DriverManager.getConnection(DB_URL);
          stmt = conn.createStatement();
          String new_AddressLine1, new_AddressLine2;
          new_AddressLine1=new_AddressLine2="";
          int new_ChannelOption= 0;
  }
  </code></pre>
  
  <p>I tried to use multiple result sets in one method but it kept throwing exceptions saying the result set was closed. I don't have much experience with SqlServver so any guidance would help :-)</p>