When I create a prepared statement like this in java (using JDBC):
pStmt = conn.prepareStatement(qry);
everything is working fine. However, when I want a scrollable result set and use this:
pStmt = conn.prepareStatement(qry,ResultSet.TYPE_SCROLL_INSENSITIVE);
I get a syntax error:
org.postgresql.util.PSQLException: ERROR: syntax error at or near "RETURNING"
I do not even use RETURNING in my request.
Any ideas?
Any help would be greatly appreciated. Thanks
Update: It seems to work if I use this:
pStmt = db.prepareStatement(qry,ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
What is the difference between SENSITIVE and INSENSITIVE?
thanks
source share