-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: com.ibm.db2.jcc.a.nn: THE SQL STATEMENT IS NOT SUPPORTED.
PostPosted: Thu Oct 01, 2009 7:23 pm 
Newbie

Joined: Wed Sep 23, 2009 10:48 am
Posts: 4
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.