Complain to the list maintainers or check your own MUA for a spurious
REPLY-TO header. The message comes in with two reply-to headers and my
MUA is just honoring them when I hit reply:

There are two cases going on here. The first is that you have invalid
SQL. You might be able to catch this by using a prepared statement
rather than a statement. In my experience, the preparation of the
statement will throw an error.

In the second case, if you really need notification about whether the
insert failed because the record existed, you need to create a stored
procedure and send back a result from it. The result will have to be in
the form of a record set (or if Oracle supports it, an OUTPUT variable).
This has the unfortunate side effect of increased overhead to handle the
result set.

I think the problem is that the executeUpdate() method was intentionally
designed to be light-weight and you are trying to use it in a situation
where you need more functionality.


Return-Path:
<[EMAIL PROTECTED]>
Received: from mail.apache.org (daedalus.apache.org [208.185.179.12])
        by starbug.mhsoftware.com (8.12.8/8.12.8) with SMTP id
i135NvL8031350
        for <[EMAIL PROTECTED]>; Mon, 2 Feb 2004 22:23:57 -0700
Received: (qmail 5054 invoked by uid 500); 3 Feb 2004 05:23:13 -0000
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:[EMAIL PROTECTED]>
List-Subscribe: <mailto:[EMAIL PROTECTED]>
List-Help: <mailto:[EMAIL PROTECTED]>
List-Post: <mailto:[EMAIL PROTECTED]>
List-Id: "Tomcat Users List" <tomcat-user.jakarta.apache.org>
Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
Delivered-To: mailing list [EMAIL PROTECTED]
Received: (qmail 5030 invoked from network); 3 Feb 2004 05:23:12 -0000
Received: from unknown (HELO ms-smtp-01-eri0.socal.rr.com)
(66.75.162.133)
  by daedalus.apache.org with SMTP; 3 Feb 2004 05:23:12 -0000
Received: from short200 (dt0c5n7b.san.rr.com [24.94.16.123])
        by ms-smtp-01-eri0.socal.rr.com (8.12.10/8.12.7) with SMTP id
i135NIOm024368
        for <[EMAIL PROTECTED]>; Mon, 2 Feb 2004 21:23:21
-0800 (PST)
Reply-To: <[EMAIL PROTECTED]>
From: "David Short" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Subject: RE: Yet another OT question.
Date: Mon, 2 Feb 2004 21:27:23 -0800
Message-ID: <[EMAIL PROTECTED]>
MIME-Version: 1.0
Content-Type: text/plain;
        charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook CWS, Build 9.0.6604 (9.0.2911.0)
In-reply-to: <[EMAIL PROTECTED]>
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Importance: Normal
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
X-Bogosity: No, tests=bogofilter, spamicity=0.000000, version=0.15.8




-----Original Message-----
From: David Short [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 02, 2004 10:27 PM
To: 'Tomcat Users List'
Subject: RE: Yet another OT question.


How about replying to one email address or the other. ok?  I'm getting
duplicate messages.  Don't get me wrong, I appreciate your help. I just
don't need the same message twice.

-----Original Message-----
From: George Sexton [mailto:[EMAIL PROTECTED]
Sent: Monday, February 02, 2004 9:20 PM
To: 'Tomcat Users List'; [EMAIL PROTECTED]
Subject: RE: Yet another OT question.


The error is signaled by getting 0 back as the number of affected
records.

-----Original Message-----
From: David Short [mailto:[EMAIL PROTECTED]
Sent: Monday, February 02, 2004 10:16 PM
To: 'Tomcat Users List'
Subject: RE: Yet another OT question.


My statement is performing an insert, which would not return a result
set.
An executeQuery() would return a result set.  I too, read the
description
about returning an int.  I intentionally tried inserting a duplicate
value
in the index, trying to force an error, and no error was generated.  The
return value was 0.  So, it is returning zero (nothing was inserted) but
that's it.  No SQLException.  There's got to be a way to catch an error
like
this.

-----Original Message-----
From: George Sexton [mailto:[EMAIL PROTECTED]
Sent: Monday, February 02, 2004 8:10 PM
To: 'Tomcat Users List'; [EMAIL PROTECTED]
Subject: RE: Yet another OT question.


I broke out my JDBC handbook (JDBC API Tutorial and Reference, Second
Edition) and it says:

"Returns an int indicating the number of rows affeted by an
INSERT,UPDATE, or DELETE statement; 0 if no rows were affected or the
statement executed was a DDL statement."

"Throws SQLException if the sepcified argument is a statement that
generates a result set."

>From reading this, it appears the driver is compliant and working per
the specification.

-----Original Message-----
From: David Short [mailto:[EMAIL PROTECTED]
Sent: Monday, February 02, 2004 7:59 PM
To: 'Tomcat Users List'
Subject: RE: Yet another OT question.


I pulled the latest (1.2 for Oracle 8.1.7) off of Oracle's web site
today.

-----Original Message-----
From: George Sexton [mailto:[EMAIL PROTECTED]
Sent: Monday, February 02, 2004 6:33 PM
To: 'Tomcat Users List'; [EMAIL PROTECTED]
Subject: RE: Yet another OT question.


Probably a flake in the Oracle driver. Check you are using the latest
one.

-----Original Message-----
From: David Short [mailto:[EMAIL PROTECTED]
Sent: Monday, February 02, 2004 4:18 PM
To: 'Tomcat Users List'
Subject: Yet another OT question.


It seems like a slow day on the list so, thought I'd throw my issue out
there.

I'm working with Tomcat 4.1.0, Oracle 8.1.7 and JDBC 1.2.  It seems that
the
JDBC executeUpdate() method doesn't raise an exception when I pass an
incorrect SQL statement.  It returns 0 rows, but no exception.  Anyone
seen
this before?



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to