Consultor Eletrônico



Kbase P152427: Error "Unsupported Method" occurs when trying to use RETURN_GENERATED_KEYS with the OpenEdge 10 JDBC
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   9/9/2009
Status: Unverified

SYMPTOM(s):

Error "Unsupported Method" occurs when trying to use RETURN_GENERATED_KEYS with the OpenEdge 10 JDBC driver

java.sql.SQLException

Stack trace:
java.sql.SQLException: [DataDirect][OpenEdge JDBC Driver]Unsupported method: Connection.prepareStatement
at com.ddtek.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.ddtek.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.ddtek.jdbc.base.BaseConnection.prepareStatement(Unknown Source)
at main.Main.main(Main.java:24)

Connection.prepareStatement is declared as:

statement = con.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);

Error does not occur when RETURN_GENERATED_KEYS has been removed

FACT(s) (Environment):

OpenEdge 10.1x
OpenEdge 10.2A
All Supported Operating Systems

CAUSE:

This is expected behaviour. The OpenEdge JDBC drivers do not support this Generated Keys feature of JDBC. For any application, this can be checked by calling the JDBC DatabaseMetaData.supportsGetGeneratedKeys() method, which will return False for OpenEdge JDBC drivers.

FIX:

Customers requiring this functionality should log an enhancement request and contact their Progress Account Managers