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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T14:16:52+00:00 2026-05-24T14:16:52+00:00

I can successfully connect to an oracle database and print out the list of

  • 0

I can successfully connect to an oracle database and print out the list of all table names using the getAllTableNames() method.

My next Idea is to filter specific tables and display all of their columns.

I am running this query at the moment (I am including the entire method.)

static void getLengths(){
String query = "SELECT column_name from user_tab_columns where table_name = '<MytableName>'"

try{
ResultSet rs = db.runQuery(query);
System.out.println(rs):
} catch (Exception ex) {
System.out.println(ex);
//Seems to be successful
}
} //End of Method

In the System.out Window I am receiving this which makes me think I just need to view my result set somehow?

oracle.jdbc.driver.DcrollableResultSet@(different number everytime I run code)

Is my result set hiding somewhere? What is the best way to go about viewing it?

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

    System.out.println(rs) just prints out the class name and handle of the ResultSet object. This is pretty useless.

    You need to loop through the result set and read the appropriate fields. Generally you write something like:

    ResultSet rs=db.runQuery(query) // I don't know where this function is coming from, but okay
    while (rs.next())
    {
      String myColumn=rs.getString("column_name");
      System.out.println(myColumn);
    }
    rs.close();
    

    You might want to read up on JDBC in general, and look at the Java Docs for Connection, Statement, and ResultSet.

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

Sidebar

Related Questions

the title already tells the question: you can successfully call the Print-Method on a
Ok I can successfully connect to my Access database but I am still learning
I'm currently using NSURLConnection to test if I can successfully connect to a server.
I am using Visual Basic 6 to connect to Oracle 11g. Yes, I can
I can successfully connect to the database with my datacontext object. I am able
I have problems using Mysql with MySQL Connector, I can successfully connect to a
I can successfully get the title, version and icon of an app using the
i have an iphone 3g and can successfully send text messages using the PHP
First of all, I can successfully debug the application in Tomcat without any errors.
I have Xdebug 2.1 installed, and running with PHP 5.2.13. It can successfully connect

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.