Subject RE: [ib-support] (unknown)
Author Nico Callewaert
Arnaldo,

Could it be that this procedure is called again in the Before Update
trigger for table "pagamenticliente". This seems like a endless loop to me
and will generate a stack overflow.

Nico Callewaert
ncw@...
nico.callewaert@...


-----Oorspronkelijk bericht-----
Van: apatri@... [mailto:apatri@...]
Verzonden: donderdag 29 maart 2001 14:41
Aan: ib-support@yahoogroups.com
Onderwerp: [ib-support] (unknown)


Just a wek ago I wrote the following message, but nobody seems read
this.
Please any hint??

Thanks
Arnaldo

*********************************************************************

Hi All.

I have the following procedure:

CREATE PROCEDURE DIFFERENZA_PAGAMENTO_CLIENTE (
NORDINE INTEGER)
AS
declare variable totaleordine numeric( 18,2 );
declare variable progressivo numeric( 18,2 );
declare variable importo numeric( 18,2 );
declare variable vmycode integer;

begin
/* find the total amount of the payment */
select totale from ordiniclienti where mycode= :nordine
into :totaleordine;
progressivo = 0; /* reset progressive counter */
/* sum the various import of the payment */
for select mycode, importo from pagamenticliente where
collordine = :nordine order by datapagamento
into :vmycode, :importo do begin
/* increment progressive counter */
progressivo = :totaleordine - ( :progressivo + :importo ) ;
/* write data on database */
update pagamenticliente set differenza = :progressivo where mycode
= :vmycode ; /**** here give me a stack error and lost the connection.
end /* for ... */
end

In brief i want sum a payment, pay it in 1, 2, 3 or what you want
subpayment.
all works fine, but seems interbase don't update a already select
table.

Please: Any hints??????

TIA
Arnaldo




To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/