This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
The moose likes JDBC and Relational Databases 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 Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
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
 
It's not a secret anymore!