Skip to main content

Get auto generated ID after insert using JDBC

  • December 17, 2014
  • 0 replies
  • 6 views

Tobias_1
I'm trying to get the auto incremented id of my insert statement using JDBC. But everything i get is the following Error: (10220) Driver not capable.

This is the JDBC call:

preparedStatement = connection.prepareStatement("INSERT INTO ...",Statement.RETURN_GENERATED_KEYS);

Is there a work around to use RETURN_GENERATED_KEYS with auto incremnt?