on 08-03-2017 6:39 PM
Hi,
In relation to this and thread https://archive.sap.com/discussions/thread/3340106
Do you know if retrieving Auto generated keys is now supported by the Hana jdbc driver. The below exception is throw when using this feature with the driver obtained from Hana db client version 1.00.120.050.1484020229 . Do you know if this is now supported and which version of the client has the driver?
java.lang.UnsupportedOperationException: Retrieving auto generated keys is not supported.
Regards,
Kalabase
Easy to try it out!
package package com.sap.db.jdbc,
Java Platform API Specification, version 1.6,
SAP HANA JDBC Driver, SAP SE,
2.0.14-2d2417a0b831eafc24c4a6d30206b73d62a858e5 on Java 1.8.0_121
=> com.sap.db.jdbc.CallableStatementSapDBFinalize@5e8c92f4
com.sap.db.jdbc.CallableStatementSapDBFinalize@5e8c92f4.setString(1, Barb)
com.sap.db.jdbc.CallableStatementSapDBFinalize@5e8c92f4.executeUpdate()
=> 1
com.sap.db.jdbc.CallableStatementSapDBFinalize@5e8c92f4.getGeneratedKeys()
<-!
Timestamp: 2017-08-04 11:46:31.87com.sap.db.jdbc.exceptions.SQLFeatureNotSupportedExceptionSapDB: Retrieving auto generated keys is not supported.
at com.sap.db.jdbc.exceptions.SQLExceptionSapDB._createException(SQLExceptionSapDB.java:155)
at com.sap.db.jdbc.exceptions.SQLExceptionSapDB.generateSQLException(SQLExceptionSapDB.java:26)
at com.sap.db.jdbc.StatementSapDB._getAutoGeneratedKeysNotSupportedException(StatementSapDB.java:1683)
at com.sap.db.jdbc.StatementSapDB.getGeneratedKeys(StatementSapDB.java:1201)
at test.InsertWithIDColumn.main(InsertWithIDColumn.java:77)
So, I'd say: no, it's not supported.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.