You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by David Short <ds...@san.rr.com> on 2004/02/03 00:18:08 UTC

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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Yet another OT question.

Posted by Adam Hardy <ah...@cyberspaceroad.com>.
Try writing a really obviously wrong SQL statement, just rubbish, & see 
if you force an error. Also check your DB logs to see whether it spat 
out an error log msg.

On 02/03/2004 07:51 AM Antonio Fiol Bonnín wrote:
> 
> When we insert duplicates, we do get SQLException as a response. We are 
> using Oracle 9.2, however.
> 
> No idea why they behave differently. What does the DB do if you insert 
> duplicates from "sqlplus" or a similar tool?
> 
> Antonio Fiol
> 
> 
> George Sexton wrote:
> 
>> The error is signaled by getting 0 back as the number of affected
>> records.
>>
>> -----Original Message-----
>> From: David Short [mailto:dshort@san.rr.com] 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:gsexton@mhsoftware.com]
>> Sent: Monday, February 02, 2004 8:10 PM
>> To: 'Tomcat Users List'; dshort@san.rr.com
>> 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:dshort@san.rr.com]
>> 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:gsexton@mhsoftware.com]
>> Sent: Monday, February 02, 2004 6:33 PM
>> To: 'Tomcat Users List'; dshort@san.rr.com
>> 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:dshort@san.rr.com]
>> 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?
>>
>>  
>>
> 


-- 
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Yet another OT question.

Posted by Antonio Fiol Bonnín <fi...@terra.es>.
When we insert duplicates, we do get SQLException as a response. We are 
using Oracle 9.2, however.

No idea why they behave differently. What does the DB do if you insert 
duplicates from "sqlplus" or a similar tool?

Antonio Fiol


George Sexton wrote:

>The error is signaled by getting 0 back as the number of affected
>records.
>
>-----Original Message-----
>From: David Short [mailto:dshort@san.rr.com] 
>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:gsexton@mhsoftware.com]
>Sent: Monday, February 02, 2004 8:10 PM
>To: 'Tomcat Users List'; dshort@san.rr.com
>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:dshort@san.rr.com]
>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:gsexton@mhsoftware.com]
>Sent: Monday, February 02, 2004 6:33 PM
>To: 'Tomcat Users List'; dshort@san.rr.com
>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:dshort@san.rr.com]
>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?
>
>  
>


RE: Yet another OT question.

Posted by George Sexton <gs...@mhsoftware.com>.
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:
<to...@jakarta.apache.org>
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 <gs...@mhsoftware.com>; 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 tomcat-user-help@jakarta.apache.org; run by ezmlm
Precedence: bulk
List-Unsubscribe: <ma...@jakarta.apache.org>
List-Subscribe: <ma...@jakarta.apache.org>
List-Help: <ma...@jakarta.apache.org>
List-Post: <ma...@jakarta.apache.org>
List-Id: "Tomcat Users List" <tomcat-user.jakarta.apache.org>
Reply-To: "Tomcat Users List" <to...@jakarta.apache.org>
Delivered-To: mailing list tomcat-user@jakarta.apache.org
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 <to...@jakarta.apache.org>; Mon, 2 Feb 2004 21:23:21
-0800 (PST)
Reply-To: <ds...@san.rr.com>
From: "David Short" <ds...@san.rr.com>
To: "'Tomcat Users List'" <to...@jakarta.apache.org>
Subject: RE: Yet another OT question.
Date: Mon, 2 Feb 2004 21:27:23 -0800
Message-ID: <01...@short200>
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: <00...@emp00>
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:dshort@san.rr.com] 
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:gsexton@mhsoftware.com]
Sent: Monday, February 02, 2004 9:20 PM
To: 'Tomcat Users List'; dshort@san.rr.com
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:dshort@san.rr.com]
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:gsexton@mhsoftware.com]
Sent: Monday, February 02, 2004 8:10 PM
To: 'Tomcat Users List'; dshort@san.rr.com
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:dshort@san.rr.com]
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:gsexton@mhsoftware.com]
Sent: Monday, February 02, 2004 6:33 PM
To: 'Tomcat Users List'; dshort@san.rr.com
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:dshort@san.rr.com]
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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Yet another OT question.

Posted by David Short <ds...@san.rr.com>.
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:gsexton@mhsoftware.com]
Sent: Monday, February 02, 2004 9:20 PM
To: 'Tomcat Users List'; dshort@san.rr.com
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:dshort@san.rr.com]
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:gsexton@mhsoftware.com]
Sent: Monday, February 02, 2004 8:10 PM
To: 'Tomcat Users List'; dshort@san.rr.com
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:dshort@san.rr.com]
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:gsexton@mhsoftware.com]
Sent: Monday, February 02, 2004 6:33 PM
To: 'Tomcat Users List'; dshort@san.rr.com
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:dshort@san.rr.com]
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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Yet another OT question.

Posted by George Sexton <gs...@mhsoftware.com>.
The error is signaled by getting 0 back as the number of affected
records.

-----Original Message-----
From: David Short [mailto:dshort@san.rr.com] 
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:gsexton@mhsoftware.com]
Sent: Monday, February 02, 2004 8:10 PM
To: 'Tomcat Users List'; dshort@san.rr.com
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:dshort@san.rr.com]
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:gsexton@mhsoftware.com]
Sent: Monday, February 02, 2004 6:33 PM
To: 'Tomcat Users List'; dshort@san.rr.com
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:dshort@san.rr.com]
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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Yet another OT question.

Posted by David Short <ds...@san.rr.com>.
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:gsexton@mhsoftware.com]
Sent: Monday, February 02, 2004 8:10 PM
To: 'Tomcat Users List'; dshort@san.rr.com
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:dshort@san.rr.com]
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:gsexton@mhsoftware.com]
Sent: Monday, February 02, 2004 6:33 PM
To: 'Tomcat Users List'; dshort@san.rr.com
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:dshort@san.rr.com]
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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Yet another OT question.

Posted by George Sexton <gs...@mhsoftware.com>.
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:dshort@san.rr.com] 
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:gsexton@mhsoftware.com]
Sent: Monday, February 02, 2004 6:33 PM
To: 'Tomcat Users List'; dshort@san.rr.com
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:dshort@san.rr.com] 
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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Yet another OT question.

Posted by David Short <ds...@san.rr.com>.
I pulled the latest (1.2 for Oracle 8.1.7) off of Oracle's web site today.

-----Original Message-----
From: George Sexton [mailto:gsexton@mhsoftware.com]
Sent: Monday, February 02, 2004 6:33 PM
To: 'Tomcat Users List'; dshort@san.rr.com
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:dshort@san.rr.com] 
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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Yet another OT question.

Posted by George Sexton <gs...@mhsoftware.com>.
Probably a flake in the Oracle driver. Check you are using the latest
one.

-----Original Message-----
From: David Short [mailto:dshort@san.rr.com] 
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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org