Subject Re: [ib-support] (unknown)
Author Vince Duggan
Arnaldo,

How do you know that it fails on that particular line?

Vince

apatri@... wrote:
>
> 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/

--
Vince Duggan
Synectics Software
Inprise C/S Business Partner
South Africa
http://www.synectics.co.za
mailto:vince@...