Name: skT88420 Date: 09/13/99
Would like a toString method in the java.sql.PreparedStatement class so that I can see what the current completely prepared statement is that is being sent to the DB as SQL. As an example, given:
PreparedStatement ps = new PreparedStatement("Select * from Table1 where ? > ?");
ps.setString(1,"ID");
ps.setInt(2,"1000");
There is for me and apparently several other programmers (as this request was put on newsgroup comp.lang.java.databases, a need to have a toString method in PreparedStatement that would return the string that would be sent to the database. This would be helpfull for debugging purposes. Please let me know of any existing class or method that would be helpful here, or please consider adding such a toString method to PreparedStatement in the next release of JDBC.
Mark Rines, ###@###.###
(Review ID: 95190)
======================================================================
- duplicates
-
JDK-4269900 JDBC 2.0 PreparedStatement: view resulting query (after substitutions made)
-
- Closed
-