on 10-01-2008 3:09 PM
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.
Hi Suresh,
The method Connection.prepareStatement(String sql, int autoGeneratedKeys) is available since JDK 1.4. However, NetWeaver 2004 / 7.0 is source compatible with JDK 1.3, so I'm afraid you can't use this feature here.
One option you could consider is switching to NW CE 7.1 which is Java SE / EE 5 compatible.
HTH!
\-- Vladimir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I could able to run the same with my own data base connection. But I could not able to run with connection obtained from JDBC connector service of Net weaver application server. Both the cases application is deployed in same application server.
I am confused. You mean to say that any services from NW application server gives support to only JDK 1.3 apis?
Pls. let me know .
Thanks,
With best regards,
Suresh.
Dear experts,
Any suggestions to my post?
Appreciate your reply.
Thanks in advance.
With best regards,
Suresh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.