JDBC: Quickest way to debug bad SQL when using PreparedStatement executeUpdate
Posted on 2004-09-02
I need a rapid way to display the value of a PreparedStatement prior to executing the executeUpdate() method. I dynamically generated the preparedStatement and subsequent setString(n,"xxx"), setInt(n+1,000) statements. I'm using the Eclipse debugger and it will only show the Prepared statement with the "?". Is there a way to log or display the entire, completed statement just prior to execution? I just spent lots of time debugging it and there must be an easier way.