1 Reply Latest reply on Jan 5, 2002 6:18 PM by David Jencks

    Help, PreparedStatement.toString() Again!!!

    Gordon Luk Newbie

      Hi Jboss Developer,

      I got a problem, that is i need to PreparedStatement.toString() return the prepared sql string.

      for example :

      my sql = "select a_field from a_table where a_field = ?"
      after set the parameter ( 1, 'a_value')
      then PreparedStatement.toString() return
      "select a_field from a_table where a_field = 'a_value'"

      in normal, like use postgres jdbc, it return the correct string... but when i via jboss connection pool, it return the hash value , like "org.jboss.XXXXx@43434". A nice guy tell me, jboss pool warpped the jdbc, so it return such string. :-(

      I really need the "after prepared string" for my program logging purpose, what can i do? Please help. Thx.


      Gordon