[
https://issues.apache.org/jira/browse/EMPIREDB-283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16744770#comment-16744770
]
Rainer Döbele commented on EMPIREDB-283:
----------------------------------------
Hi all,
I am working primarily with Oracle (11 und 12) and SQLServer <= 2014 and never
had any such issue.
Empire-db creates a timestamp, writes it to the database and then expects to
get the same value back. In Gunnars case this works. But then it fails when the
exact value is used to build a constraint that compares the returned value with
the on in the database. That is just odd.
And Jan: How can the creation or restoration of a dump change a particular
value in the database? Does it correct spelling mistakes as well? If a dump
creation or restoration changes anything, I'd be deeply worried.
Maybe there is a distinction between milliseconds and nanoseconds, but I have
to investigate this further.
In any case this seems to be a general JDBC problem not just an empire-db
problem. But empire-db should provide a safe way to avoid this problem.
Any additional input for this problem or experiences with other DBMS are
welcome.
Regards,
Rainer
> 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.4, empire-db-2.4.6, empire-db-2.4.7
> Environment: JAVA 8, WIN2K12R2, MS-SQL-SRV > 2012, JDBC-Driver 4.2,
> 6.0, 7.0
> Reporter: Gunnar Kappei
> Priority: Major
>
> 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)