Home » Developer & Programmer » JDeveloper, Java & XML » JDBC : Resultset methods
JDBC : Resultset methods [message #511975] Thu, 16 June 2011 06:26
Messages: 24
Registered: June 2011
Location: Pune
Junior Member

I am writing a java file which is pulling values from a table in my database.

I need to take the count that how many row are pulled into the resultset.

For that reason I am using the following logic
   rs = stmt.executeQuery("select col1,col2 from tab where ...");
   int rsCount = rs.getRow();

I checked the query in java, it is returning the required fields in the resultset.

I am getting the error at 'rs.last()'.
When i debug the code at this line I get the following message:
The JAR file C:\ORACLE_HOME\jdbc\lib\ojdbc5.jar has no source attachment.

I have added the the ojdbc5.jar and orai18n.jar into my classpaths.
I am using Oracle

Please help me out. I am also trying my best to solve this problem...

Thank You,
Previous Topic: Need a Procedure for reading xml element value
Next Topic: easy and urgent task
Goto Forum:

Current Time: Thu Oct 08 12:08:04 CDT 2015

Total time taken to generate the page: 0.04997 seconds