Subject Re: Problem in stored procedure for multiple deletes/multiple times use of i/p vari.
Author Sudarshan Wad
hi,
No, i tried that too.It gave the same error.Also if i use only one
delete statement in this procedure and commit; it works but when i
try more than one statements which use the same input parameter,it
fails.


eg.
> > SET TERM ##;
> > CREATE PROCEDURE Z2(
> > CALAPP_ID INTEGER,
CALAPP_KEY INTEGER
> > )
> > AS
> > BEGIN
> > delete from calappparams where caid = :calapp_id;
> > delete from hostedapps where caid = :calapp_key;
> > END ##;
> > SET TERM ;##

commit;
This works fine.

but when i use :calpp_id at 2 locations it gives an error.why? i
don't know


sudarshan

--- In firebird-support@yahoogroups.com, "Nigel Weeks" <nigel@e...>
wrote:
> > hi,
> > Thanx for the reply i tried the changes you told me but still
it
> > is giving an error.
> >
> > changed code is -
> >
> > SET TERM ##;
> > CREATE PROCEDURE Z2(
> > CALAPP_ID INTEGER
> > )
> > AS
> > BEGIN
> > delete from calappparams where caid = :calapp_id;
> > delete from hostedapps where caid = :calapp_id;
> > END ##;
> > SET TERM ;##
> >
> > error message after commit; is
> > ->
> > Statement #1:
> > invalid request BLR at offset 90
> > bad parameter number
> >
> > My firebird version is -> FireBird 1.0.2
> > I am using MiTeC Interbase/Firebird administartive tool as a
query
> > analyser.
> > If you get any hint/solution plese let me know.Thank you.
> >
> > sudarshan
>
>
> It looks like you don't have spaces between parameters in your SET
TERM
> lines
>
> You need:
> SET TERM ## ;
> not
> SET TERM ##;