Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

did bc4j create row with sequence change from integer to long

10469Jul 18 2002
When creating a new row through bc4j with database sequence for primary key, I followed the online examples and even checked the samples distributed with jdev production 9.0.2. They all show that the sequence is returned as Integer. I finally changed it to Long and got it to work. Has there been a change, or have I got something else fouled up?

This is the code that worked...

protected void create(AttributeList attributeList)
{
super.create(attributeList);
// get the next template ID from database sequence
SequenceImpl s = new SequenceImpl("XXPRC_TEMPLATE_ID_S", getDBTransaction() );
java.lang.Long next = (java.lang.Long) s.getData();
setTemplateId( new Number(next) );
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 16 2002
Added on Jul 18 2002
5 comments
198 views