File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies 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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: com.ibm.db2.jcc.a.nn: THE SQL STATEMENT IS NOT SUPPORTED.
 
Similar Threads
Passing parameter to date function in DB2
Syntax check (losing hair now)...
db2 express-c 9.7 failure in loading t2 native library db2jcct2
SQLCODE : -99999 JdbcType 0 is not yet Supported
Hibernate: ORM Mapping "Could not get next sequence value" SQLCODE: -142