File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
Best way to generate PK in EJB
Porting cmp from jboss 3.2.1 to 3.2.3 for postgresql
inserted primary key
Auto Composite key with Id and version
Initial Context problem