This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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
 
Similar Threads
Porting cmp from jboss 3.2.1 to 3.2.3 for postgresql
inserted primary key
Best way to generate PK in EJB
Auto Composite key with Id and version
Initial Context problem