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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: postgresql - How to fix -Returning autogenerated keys is not supported. exception