Skip to Content
0
Former Member
May 17, 2006 at 11:42 AM

Generating Sequence Number

20 Views

I am trying to Generate Sequence Number using a user defined function. For some reason it is not working. I got this piece of code from one of the training manuals.

//write your code here

int inc = 1;

Integer seqNo = (Integer)container.getParameter("seqNo");

if (seqNo == null) {

seqNo = new Integer(inc);

}

else {

int number = seqNo.intValue() + inc;

seqNo = new Integer(number);

}

container.setParameter("seqNo",seqNo);

return seqNo.toString();

Any help appreciated.