Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Prepared Stmt execution is failing with auto genrerated keys option

Dear Experts

I am executing a prepared statement with auto generated keys set.

It looks like following. Actually im trying to get the auto generated keys after the execution of prepared statement . But it is failing.

String query= "INSERT INTO AlertMessage WITH(ROWLOCK) (Message) VALUES (?)";

PreparedStatement pstmt = null;

pstmt= connection.prepareStatement(query, PreparedStatement.RETURN_GENERATED_KEYS);

pstmt.setString(1, "Suresh testing ");

int i = pstmt.executeUpdate();

Error that I am getting is given below and I am using datsource configured through JDBC connector service to get the database connection.

java.lang.AbstractMethodError: com.sap.engine.services.dbpool.cci.ConnectionHandle.prepareStatement(Ljava/lang/String;I)Ljava/sql/PreparedStatement;

Exception id: [001438BD95D9003E00000051000012AC000458318FF1FC64]

Could you pls. provide any suggestions or solutions to this.

Thanks in advance,

With best regards,

Suresh.

replied

Hi Suresh,

I already wrote this in my first reply: [NW CE 7.1|https://www.sdn.sap.com/irj/sdn/nw-ce-downloads] is Java SE / Java EE 5 compatible, which of course means also J2SE / J2EE 1.4 compatible.

Regards,

Vladimir

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question