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 7166767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:27:59+00:00 2026-05-28T14:27:59+00:00

Well, that must be an easy one but I can’t find the solution anywhere.

  • 0

Well, that must be an easy one but I can’t find the solution anywhere. And I am still not enough comfortable using Java to figure out the way to do it.

So far, I am able to loop through a ResultSet and I’m quite proud of myself already.

I would like a List so I could simply loop through it and then call something like myRow.get('ColumnName');.

Also, there MIGHT another data type instead of a Hashtable to store the key/value. Any tips?

Thank you very much!

  • 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-05-28T14:28:00+00:00Added an answer on May 28, 2026 at 2:28 pm

    myRow.get('ColumnName'); is already in ResultSet, see getObject(String columnLabel). Now, one difference between ResultSet and Map is that a ResultSet is not (always) random access. Once you go past a row, using ResultSet.next(), it may not allow you to “rewind” to the previous row. There is good reason for this: the number of elements in ReusltSet can be arbitrarily large and the memory requirement on a list of map would be prohibitive.

    If you do decide to convert it to a List<Map<String, Object>> then you should create your own implementation of both the List and the Map, such that a Map<String /*columnName*/, Integer /*Index*/> is gives the index of a column-name in each array. I am speaking from experience, I had to change an implementation where a iterating through list of column names was too expensive.

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

Sidebar

Related Questions

If I'm designing af tool that must screenshot well for printed documentation, can I
Well, I must say , I am lost with a feeling that the operation
Disclaimer I am well aware that PHP might not have been the best choice
I have a UIDatePicker that well, allows you to select a date (not time).
I think I must be missing something obvious, but I'm unable to find this
I know this must be asked a millions times and can't be easy to
Tomcat has got that well-known memory leak problem that causes PermGen space errors after
It is well-known that monoids are stunningly ubiquitous in programing. They are so ubiquitous
It may well be that I have to write something overly complex for this
While I am well aware that it isn't possible for me to refer to

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.