• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Not getting resultSet from Prepared statement

 
Jay Bash
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI ALL

I am not getting the resultSet when i execute the preparedStatement.
While the same query if i run from DBVisulizer I am getting the resultset.

Here is my code.

outputActualQuery(query,values);
handleValues(pStmt, values);
ResultSet res = pStmt.executeQuery();

in outputActualQuery i will just replacing ? with the actual value to print query to log file.
The query which is printed in log is returning the values from DB TOOL.

And handleValues will actually inject the values to prepared statement.
but pStmt is empty result set.


Thanks in advance

Jay


 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34965
377
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jay,
Can you show the content of those methods? And the query.
 
Jay Bash
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne

Thanks for your concern.
I was able to solve the problem.

Actually there was two diffrent pools are there.
One pool is connected to Oracle 9i and another is connection to Oracle 10g.

Reason i am not getting the data is becuase of data miss match.
In DBVisulizer when i run the query it was getting it from the database which has the data instead of right database.
This might be bug or not avaialble feature on trial version.



thanks
Jay.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34965
377
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for sharing the answer.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic