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

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 ...");
   rs.last();
   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 11.1.2.1.

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

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


Current Time: Sun Dec 21 09:14:05 CST 2014

Total time taken to generate the page: 0.03975 seconds