We are calling executeUpdate() on a PreparedStatement to do an insert.
The call does not throw an exception but the value returned is -1 which indicates that no rows were inserted.
We were using JDBC 2.0, but upgrading to 3.0 made no difference.
The instance in question is a Developer Edition with this version:
Microsoft SQL Server 2008 (SP1) - 10.0.2757.0 (X64) Jan 8 2010 19:55:08
Developer Edition (64-bit) on Windows NT 6.0 <X64> (Build 6002: Service Pack 2)
Using a different instance works as expected. Its version is:
Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (X64) Mar 29 2009 10:11:52
Developer Edition (64-bit) on Windows NT 6.1 <X64> (Build 7600: )
Executing an insert from SSMS into the table in the problem instance works just fine.
JVM version is
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode)
View Complete Post