Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Oracle Tools > JDBC question: ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 2700 of 2817
Post > Topic >>

JDBC question: show PreparedStatement

by Joolz <root@[EMAIL PROTECTED] > Jan 31, 2008 at 09:35 AM

Hello everyone,

A small question about JDBC. When I do something like this:

  PreparedStatement stmt = conn.prepareStatement("select * " +
    "from fu where bar = ?");
  stmt.setString(1, "blah");
  System.out.println(stmt.toString()); // show me what will be asked

I would like to see which query will be sent to the DB (i.e. "select *
from fu where bar = 'blah'"), which would be very nice for debugging.
toString() won't do the trick (it gives something like
"oracle.jdbc.driver.T4CPreparedStatement@[EMAIL PROTECTED]
"). Is there a way to
solve this? TIA!
 




 2 Posts in Topic:
JDBC question: show PreparedStatement
Joolz <root@[EMAIL PRO  2008-01-31 09:35:40 
Re: JDBC question: show PreparedStatement
Markus Tazl <m_tazl@[E  2008-02-02 01:21:16 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Oct 15 13:33:18 CDT 2008.