Re: Wait event SQL*Net break/reset to client caused by duplicate insert?

From: Nigel Thomas <nigel_cl_thomas_at_yahoo.com>
Date: Thu, 10 Apr 2008 04:45:54 -0700 (PDT)
Message-ID: <58444.32682.qm@web58806.mail.re1.yahoo.com>

  • On Thu, 4/10/08, Peter Hitchman <pjhoraclel_at_gmail.com> wrote:

> From: Peter Hitchman <pjhoraclel_at_gmail.com>
> I
> suggested a change to first update and then insert if no
> row is updated. I
> also considered using merge, but I thought that it might
> not be supported by
> the jdbc driver and time pressure means we do not have the
> time to find out.

Peter

If you don't want to try MERGE, you could always make an anonymous PL/SQL block (which is certainly supported by PL/SQL) and so handle the insert-else-update (or update-else-insert - whichever is the best tradeoff) in one SQL round trip from application server to database; then there will never need to be an exception raised to (and handled by) JDBC.

Cheers Nigel

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Apr 10 2008 - 06:45:54 CDT

Original text of this message