Gunnar Kappei created EMPIREDB-283:
--------------------------------------

             Summary: PreparedStatements not working with MS SQL-Server > 2012
                 Key: EMPIREDB-283
                 URL: https://issues.apache.org/jira/browse/EMPIREDB-283
             Project: Empire-DB
          Issue Type: Bug
          Components: Core
    Affects Versions: empire-db-2.4.7, empire-db-2.4.6, empire-db-2.4.4
         Environment: JAVA 8, WIN2K12R2, MS-SQL-SRV > 2012, JDBC-Driver 4.2, 
6.0, 7.0
            Reporter: Gunnar Kappei


Since the company I'm working at upgraded their database-servers from MS-SQL 
2012 to 2016, there seems to be an issue when using PreparedsStatements 
together with Empire-DB.

When enabling PreparedStatements via 
DBDatabase#setPreparedStatementsEnabled(true), it's not possible to perfom 
SQL-UPDATEs.

Debugging the sources I found out, that the problem is located nside the 
executeSql-method of the DBDatabase / DBDatabaseDriverMSSQL classes.  The 
number of affected records is < 0. Therefore an exception is thrown. There is 
no issue with INSERT statements.

When disabling PreparedStatements, the code is working fine again since it did 
for years now. Tried Empire-DB 2.4.4, 2.4.6, 2.4.7 and several versions of the 
official JDBC driver from MS. On several database-servers. Getting the same 
result every time. 

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to