4 Replies Latest reply on May 14, 2014 7:24 AM by gadeyne.bram

    Generated Key from MySQL

    gadeyne.bram Master

      Hi,

       

      I'm using Teiid 8.6. My virtual database connects to a MySQL table that contains an autoincrement value.

       

      I'd like to know this inserted key so I'm using Statement.RETURN_GENERATED_KEYS. When the method executeUpdate is executed I get an error :

       

      Remote java.sql.SQLException: Generated keys not requested. You need to specify Statement.RETURN_GENERATED_KEYS to Statement.executeUpdate() or Connection.prepareStatement().

       

      Does Teiid support this functionality? In the documentation I found that it only works on columns that have a SERIAL option.

       

      With kind regards

      Bram