| Author |
Not getting resultSet from Prepared statement
|
Jay Bash
Greenhorn
Joined: Jun 29, 2007
Posts: 5
|
|
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
internet detective
Marshal
Joined: May 26, 2003
Posts: 26201
|
|
Jay,
Can you show the content of those methods? And the query.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
Jay Bash
Greenhorn
Joined: Jun 29, 2007
Posts: 5
|
|
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
internet detective
Marshal
Joined: May 26, 2003
Posts: 26201
|
|
|
Thanks for sharing the answer.
|
 |
 |
|
|
subject: Not getting resultSet from Prepared statement
|
|
|