my dog learned polymorphism*
The moose likes Struts and the fly likes ExecuteQuery Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "ExecuteQuery Error " Watch "ExecuteQuery Error " New topic
Author

ExecuteQuery Error

Lalit Vora
Ranch Hand

Joined: Jun 22, 2006
Posts: 37
Hi when i run following code

String N= "abc";
ResultSet rset2 = stmt.executeQuery("select price from stock where symbol='"+N+"'");
System.out.println("value is "+rset2);

i get error oracle.jdbc.driver.OracleResultSetImpl@2c84d9

But query works for simple statement select * from stocks;
Any idea please guide me.
Thanks
Lalit
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

That isn't an error. That is simply the value returned by the toString() method of the ResultSet you created. It doesn't mean anything, true, but then it doesn't mean anything to print a ResultSet anyway. Normally the next part of your code would read through the ResultSet and extract the data from it.
Lalit Vora
Ranch Hand

Joined: Jun 22, 2006
Posts: 37
Hi Paul,

Can explain in more simpler way i am not getting it. How will i get my actual value from resultset like i should get price as 26.97 instead this value. How to display then original value so that i can display it in report?

Please guide me

Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ExecuteQuery Error
 
Similar Threads
Strange goings on with Hashtable
JDBC error
Problems with NamedQuery in hbm.xml
JTable Searching
Pagination using resultset to populate a tablemodel