updation error

in my DupCust Table my Requirement is linenum(Like Qty* Salesprice) is caluculated when qty is updated for that i wrote a program like

public void update()


DupCust dupCust;

QtyOrdered qtyOrdered;

SalesPrice salesPrice ;



ttsbegin ;

select forupdate QtyOrdered from dupCust

where dupCust.LineNum == QtyOrdered *SalesPrice;




any mistakes in that program … pls tell me … but i am getting error the upper limit cursors of MSAX exceeded How can i solve it pls solve it

You can’t select and assign in the same line. You must first select the record you are trying to update, then update it. The code you provided is non-sense though…I’m completely lost at what you are trying to do.

select forupdate dupCust where dupCust.LineNum == (This is where you put the line number of the record you are trying to update);

I have no idea what you are trying to accomplish though.

thank u consider my problem

in my form qty field changes automatically change linenum(ACC … qty* salesprice) field

You’re getting into infinite recursion, because the update() method always calls itself.

You don’t need any explicit update at all - simply set the value to this.LineNum above super() - the record is saved in super(). Also, you’ll probably want to use this.QtyOrdered and this.SalesPrice instead of your empty variables.

hi martin

i wrote program what u said its not working … will u please post the coding … PLS… PLS

This what I meant (that’s how I understood your attempt):

this.LineNum = this.QtyOrdered * this.SalesPrice;

I don’t know what new code you wrote nor what’s the problem with that, so I can’t give you any more advice. You would have to provide more details.