Bugs item #668988, was opened at 2003-01-16 02:49
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=668988&group_id=22866

Category: JBossCMP
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Bruce Barrow (bruce_b)
Assigned to: Nobody/Anonymous (nobody)
Summary: MSSQL Delete - driver issue?

Initial Comment:
We have issues getting JBoss to work correctly with 
SQLServer 2000. When performing a single-row delete, 
the 'rowcount' value is returned as zero. So we do a 
rollback, and the record is left.

We have tried this with 2 drivers so far - the Microsoft 
one and one from 

We're building a product which runs on WLS, JBoss, 
with Oracle and MSSQL, so we don't want to put in 
a 'frig' to ignore the zero rowcount if we're running JBoss 
& SQLServer - we'd like to find out why this is happening.

We're running against JAVA 1.4, which we require for 
some functionality we have implemented. This means 
that the JDBC driver is not certified (as MS only certifies 
for 1.3 - possibly because of this issue?) so I'm 
wondering whether anyone else has come across this 
issue.

Possible solutions we've identified include
a) waiting for hell to freeze over (or Microsoft to release a 
1.4-compliant driver, whichever happens first)
b) doing an update operation firrst to determine that the 
right number of record(s) will be deleted, and therefore 
locking the record(s) until the delete is finished.
c) try another JDBC driver to see whether it's an issue 
with the particular ones we've used so far.

Any thoughts gratefully received.

----------------------------------------------------------------------

Comment By: Jeremy Boynes (jboynes)
Date: 2003-01-16 08:29

Message:
Logged In: YES 
user_id=378919

Can you check if you have any triggers on the table and
whether they have SET NOCOUNT ON specified.

PreparedStatement.executeUpdate returns the first update
count from the batch. If this generated in a trigger
confusing things happen. SET NOCOUNT ON prevents update
counts from statements in the trigger from being returned.

I see the following results on WinXP JDK141 against SQL2000
with both Microsoft and i-net.de drivers:

Delete, no trigger :- update count = 1
Delete, trigger, missing nocount :- update count = 0
Delete, trigger, nocount :- update count = 1

The trigger does a delete statement that affects 0 rows

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=668988&group_id=22866


-------------------------------------------------------
This SF.NET email is sponsored by: Thawte.com
Understand how to protect your customers personal information by implementing
SSL on your Apache Web Server. Click here to get our FREE Thawte Apache 
Guide: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to