1 Reply Latest reply on Sep 12, 2003 7:53 AM by Achilleus Mantzios

    PreparedStatement final actual SQL retrieval

    Achilleus Mantzios Newbie

      Is there a way to grab the actual SQL submitted to the DB somewhere around executeUpdate() ?

      I use Jboss Connection Pool and from what i've seen jboss wraps
      Postgresql's org.postgresql.jdbc3.Jdbc3Connection and org.postgresql.jdbc3Jdbc3PreparedStatement
      to org.jboss.resource.adapter.jdbc.local.LocalConnection and org.jboss.resource.adapter.jdbc.local.LocalPreparedStatement.

      This way i just cant cast my PreparedStatement to
      org.postgresql.jdbc3Jdbc3PreparedStatement which has a convinient
      toString() method.

      Is there something equivalent for org.jboss.resource.adapter.jdbc.local.LocalPreparedStatement??

      Anyone else had this need???

      There is always the standard way of creating a new wraper class
      that implements PreparedStatement, but since its already implemented
      in postgresql i hate to reimplement it.

      I am using the postgresql 7.3.4 jdbc driver, and running jboss 3.0.3.