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 Object Relational Mapping and the fly likes com.ibm.db2.jcc.a.nn: THE SQL STATEMENT IS NOT SUPPORTED. 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 » Object Relational Mapping
Bookmark "com.ibm.db2.jcc.a.nn: THE SQL STATEMENT IS NOT SUPPORTED." Watch "com.ibm.db2.jcc.a.nn: THE SQL STATEMENT IS NOT SUPPORTED." New topic
Author

com.ibm.db2.jcc.a.nn: THE SQL STATEMENT IS NOT SUPPORTED.

s bhushan
Greenhorn

Joined: Oct 01, 2009
Posts: 1
DebugPreparedStatement.executeQuery SQLException occurred for sql: values nextval for schemaA.CUSTID_SEQ
com.ibm.db2.jcc.a.nn: THE SQL STATEMENT IS NOT SUPPORTED. SQLCODE=-142, SQLSTATE=42612, DRIVER=3.52.99

I am using sequence to generate unique values but getting above error.

@SequenceGenerator(name="CUSTID_SEQ", sequenceName="CUSTID_SEQ")
public class Customer implements Serializable{
@Id
@Column(name = "custId")
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="CUSTID_SEQ")
private Integer custId.
}
I tried using all possible DB2 dialects.
Please provide solution so that I can use sequence and get next value.
 
wood burning stoves
 
subject: com.ibm.db2.jcc.a.nn: THE SQL STATEMENT IS NOT SUPPORTED.
 
Similar Threads
Hibernate: ORM Mapping "Could not get next sequence value" SQLCODE: -142
Syntax check (losing hair now)...
SQLCODE : -99999 JdbcType 0 is not yet Supported
Passing parameter to date function in DB2
db2 express-c 9.7 failure in loading t2 native library db2jcct2