aspose file tools*
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
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: com.ibm.db2.jcc.a.nn: THE SQL STATEMENT IS NOT SUPPORTED.