Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8845059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:38:41+00:00 2026-06-14T11:38:41+00:00

I seem to be having some issues with my result sets I have named

  • 0

I seem to be having some issues with my result sets I have named them differently but they both seem to have the same data in but I can’t figure it out why.

String query = "SELECT * FROM blog_comments;";
ResultSet rs = stmt.executeQuery(query);
ResultSetMetaData rsmd = rs.getMetaData();
int colNum = rsmd.getColumnCount();
boolean more = rs.next();

String query2 = "SELECT * FROM blog_entries;";
ResultSet rs2 = stmt.executeQuery(query2);
ResultSetMetaData rsmd2 = rs2.getMetaData();
int colNum2 = rsmd2.getColumnCount();
boolean more2 = rs2.next();

I have looked in debugging and they both have the same columns but i don’t think they should have any suggestions.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T11:38:42+00:00Added an answer on June 14, 2026 at 11:38 am

    you need a new Statement to instantiate your new ResultSet.

    Statement st1 = Conn.CreateStatement();
    Statement st2 = Conn.CreateStatement();
    
    ResultSet rs1 = st1.executeQuery();
    ResultSet rs2 = st2.executeQuery();
    

    From Statement API.

    By default, only one ResultSet object per Statement object can be open
    at the same time. Therefore, if the reading of one ResultSet object is
    interleaved with the reading of another, each must have been generated
    by different Statement objects. All execution methods in the Statement
    interface implicitly close a statment’s current ResultSet object if an
    open one exists.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Seem to be having some issues storing the current date in a core data
Evening guys, This may seem like a stupid question but im having some issues
I'm attempting to write a plugin for WordPress but I'm having some issues with
I seem to be having some issues while attempting to implement logging into my
I installed scala 2.8.0 last night and I seem to be having some issues
We are having some issues with our data layer when large datasets are returned
Seem to be having some issues with executing jQuery code in the caption class.
I seem to be having some issues with my domain controller when trying to
I am having some issues where my UITableView is not reloading, I have redone
I'm having some issues setting up django-mssql on Win Server 2008 R2. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.