Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Viewing SQL after parameters are bound to PreparedStatement

Re: Viewing SQL after parameters are bound to PreparedStatement

From: Ed Stevens <nospam_at_noway.nohow>
Date: Thu, 01 May 2003 10:01:09 -0500
Message-ID: <rjd2bvg962sm12pvkc53csf5b4vo758ac4@4ax.com>


On Wed, 30 Apr 2003 18:11:05 +0000,
bsnyder_at_NO-SPAM-pclnxbsnyder.digitalglobe.com wrote:

>I'm having trouble with some DML that is deleting from a table using
>two oracle.sql.TIMESTAMPs. If I run the SQL by hand via SQL*Plus the
>correct rows are removed from the table. If the SQL is executed via an
>oracle.jdbc.driver.OraclePreparedStatement nothing is deleted. One of my
>guesses is that something may be wrong with those TIMESTAMPs as they're
>bound to the OraclePreparedStatement. However, I cannot determine if
>this is the case without viewing the SQL *after* those parameters have
>been bound.
>
>Does anyone know any tricks to viewing SQL from an OraclePreparedStatement
>after parameters have been bound to it?
>
>Thanks!

SELECT T.SQL_TEXT
FROM V$SQLTEXT T,
            V$SESSION S
WHERE S.SID = 18
      AND S.SQL_ADDRESS=T.ADDRESS
ORDER BY T.PIECE Received on Thu May 01 2003 - 10:01:09 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US