1 Reply Latest reply on Sep 18, 2012 8:05 AM by Steven Hawkins

    RETURN_GENERATED_KEYS in Teiid jdbc client 8.1

    jean duracel Newbie

      Hello,

       

      I'm doing some tests against an embedded verstion of Teiid 8.1.

       

      I try to put Teiid inside an already existing web application to be able to access different databases without having to adapt my SQL queries to each one but only for Teiid.

       

      Some of these queries (INSERT)  are based on PreparedStatement with a Statement.RETURN_GENERATED_KEYS.

       

      I discover that this feature is not supported inside Teiid JDBC driver  as it could be seen inside the client code :

       

      public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys)

                                    throws SQLException {

                          throw SqlUtil.createFeatureNotSupportedException();

      }

       

      It seems that I need to adapt my queries to avoid this capability but I don't see how to achieve this ?

       

      Thanks in advance for your help.

       

      Jean