![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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@1e859c0") . Is there a way to solve this? TIA! |
#3
| |||
| |||
|
|
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@1e859c0") . Is there a way to solve this? TIA! |
#4
| |||
| |||
|
|
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@1e859c0") . Is there a way to solve this? TIA! |
#5
| |||
| |||
|
|
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@1e859c0") . Is there a way to solve this? TIA! |
#6
| |||
| |||
|
|
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@1e859c0") . Is there a way to solve this? TIA! |
#7
| |||
| |||
|
|
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@1e859c0") . Is there a way to solve this? TIA! |
#8
| |||
| |||
|
|
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@1e859c0") . Is there a way to solve this? TIA! |
![]() |
| Thread Tools | |
| Display Modes | |
| |