Re: Bug with Multiple Result Sets?
- From: evanba@xxxxxxxxxxxxxxxxxxxx (Evan T. Basalik (MSFT))
- Date: Mon, 13 Mar 2006 22:04:23 GMT
Wes,
I did some more playing around and it looks like I can only repro the problem if I use Statement.Execute. If I use PreparedStatement or CallableStatement,
the update counts are picked up correctly.
We are still researching...
Evan
--------------------
X-Tomcat-ID: 563255050C08A52F2E576@xxxxxxxxxxxxx> <On#bgN3JGHA.2992@xxxxxxxxxxxxxxxxxxxx> <v0UZ$NCLGHA.1240@xxxxxxxxxxxxxxxxxxxxx> <12CE9C6C-9E6F-
References: <BFF86425-775F-4123-AE58-3C84FE25425C@xxxxxxxxxxxxx> <43DD5D6F.3060806@xxxxxxx> <461F7166-63ED-4C52-85CE-
4ACA-9463-FE9799075C52@xxxxxxxxxxxxx> <09HCtnjNGHA.3504@xxxxxxxxxxxxxxxxxxxxx> <ED7C8EFF-FDFF-46C4-8280-16162AB415F7
@microsoft.com>
From: evanba@xxxxxxxxxxxxxxxxxxxx (Evan T. Basalik (MSFT))
Organization: Microsoft
Date: Fri, 24 Feb 2006 22:44:21 GMT
Subject: Re: Bug with Multiple Result Sets?
Wes,
With your code and stored proc, I am able to reproduce the results. Let me do some more testing and I will let you know what I find.
Evan
--------------------
Thread-Topic: Bug with Multiple Result Sets?
Subject: Re: Bug with Multiple Result Sets?
Date: Mon, 20 Feb 2006 16:56:29 -0800
Here are some very interesting results. I created a stored procedure that
returned result set interspersed with update counts:
CREATE PROCEDURE testProcReturns
AS
BEGIN
SELECT VacationHours from HumanResources.Employee where employeeID < 3;
update HumanResources.Employee set VacationHours = VacationHours + 1 where
employeeID < 3;
SELECT VacationHours from HumanResources.Employee where employeeID < 3;
update HumanResources.Employee set VacationHours = VacationHours - 1 where
employeeID < 3;
SELECT VacationHours from HumanResources.Employee where employeeID < 3;
END;
When I ran the procedure using all four drivers, all except the new driver
correctly returned the update counts:
Class being loaded com.microsoft.sqlserver.jdbc.SQLServerDriver
URL being used:
jdbc:sqlserver://localhost:2005;selectMethod=direct;databaseName=AdventureWorks;user=sa;password=123
Vacation hours is 21
Vacation hours is 42
Vacation hours is 22
Vacation hours is 43
Vacation hours is 21
Vacation hours is 42
Class being loaded com.microsoft.jdbc.sqlserver.SQLServerDriver
URL being used:
jdbc:microsoft:sqlserver://localhost:2005;selectMethod=direct;databaseName=AdventureWorks;user=sa;password=123;
Vacation hours is 21
Vacation hours is 42
Update count is: 2
Vacation hours is 22
Vacation hours is 43
Update count is: 2
Vacation hours is 21
Vacation hours is 42
Class being loaded com.newatlanta.jturbo.driver.Driver
URL being used:
jdbc:JTurbo://localhost:2005/AdventureWorks/user=sa/password=123
Vacation hours is 21
Vacation hours is 42
Update count is: 2
Vacation hours is 22
Vacation hours is 43
Update count is: 2
Vacation hours is 21
Vacation hours is 42
Class being loaded net.sourceforge.jtds.jdbc.Driver
URL being used:
jdbc:jtds:sqlserver://localhost:2005/AdventureWorks;user=sa;password=123
Vacation hours is 21
Vacation hours is 42
Update count is: 2
Vacation hours is 22
Vacation hours is 43
Update count is: 2
Vacation hours is 21
Vacation hours is 42
I am not clear what is going on here, but these results strongly suggest the
new driver is not behaving correctly.
--
This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.
--
This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.
.
- Follow-Ups:
- Re: Bug with Multiple Result Sets?
- From: Wes Clark
- Re: Bug with Multiple Result Sets?
- Prev by Date: Re: How to change to using direct vs. cursor for queries within co
- Next by Date: Re: Bug with Multiple Result Sets?
- Previous by thread: Re: Bug with Multiple Result Sets?
- Next by thread: Re: Bug with Multiple Result Sets?
- Index(es):
Relevant Pages
|