aspose file tools*
The moose likes JDBC and the fly likes postgresql - How to fix -Returning autogenerated keys is not supported. exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "postgresql - How to fix -Returning autogenerated keys is not supported. exception" Watch "postgresql - How to fix -Returning autogenerated keys is not supported. exception" New topic
Author

postgresql - How to fix -Returning autogenerated keys is not supported. exception

Manoj Raghuwanshi
Ranch Hand

Joined: Jun 20, 2004
Posts: 75
I am using postgresql database. I using sequence as a primary key in a table.
After inserting a row using preparedStatement, I want to know this auto generated id. For this i am using the jdbc 3 method ,
pstmt = conn.prepareStatement(query,
Statement.RETURN_GENERATED_KEYS);

But the postgresql driver is throwing this exception -
Returning autogenerated keys is not supported.
please help me to fix this problem.Thanks in advance.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: postgresql - How to fix -Returning autogenerated keys is not supported. exception