Subject | RE: [ib-support] Firebird Workbench, EXECUTE Stored Procedure within another Stored Procedure. |
---|---|
Author | Henrik Sitter |
Post date | 2003-01-09T19:22:15Z |
Hello, Martijn (again).
I got it to work, so thanks to you and Svein Erling who helped :)
No I'm trying to figure out how to connect to my test database using the
API in a simple C++ application (using tcp/ip protocol), but that's
another story... With some patience and thinking it will work too.
Henrik
-----Original Message-----
From: Martijn Tonies [mailto:m.tonies@...]
Sent: 9. januar 2003 20:14
To: ib-support@yahoogroups.com
Subject: Re: [ib-support] Firebird Workbench, EXECUTE Stored Procedure
within another Stored Procedure.
Hi Henrik,
EXECUTE PROCEDURE TEST1 RETURN_VALUES :param/var, :etc...
You have to declare a couple of parameters or variables that will hold
the returning values.
And from your previous post about TEST1, you should most probably
use SELECT ... FROM TEST1
With regards,
Martijn Tonies
InterBase Workbench - the developer tool for InterBase & Firebird
Firebird Workbench - the developer tool for Firebird
Upscene Productions
http://www.upscene.com
"This is an object-oriented system.
If we change anything, the users object."
ib-support-unsubscribe@egroups.com
Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
I got it to work, so thanks to you and Svein Erling who helped :)
No I'm trying to figure out how to connect to my test database using the
API in a simple C++ application (using tcp/ip protocol), but that's
another story... With some patience and thinking it will work too.
Henrik
-----Original Message-----
From: Martijn Tonies [mailto:m.tonies@...]
Sent: 9. januar 2003 20:14
To: ib-support@yahoogroups.com
Subject: Re: [ib-support] Firebird Workbench, EXECUTE Stored Procedure
within another Stored Procedure.
Hi Henrik,
> I tried the following code for procedure TEST2:VAR_LEVERANDOR
>
> SET TERM ^! ;
> CREATE PROCEDURE TEST2 returns (VAR_VARETYPE VarChar(50),
> VarChar(50), VAR_ADRESSE1 VarChar(50), VAR_KONTAKTPERSON VarChar(50),What I meant was something like:
> VAR_TELLER Integer) AS
> BEGIN
> EXECUTE PROCEDURE TEST1 ;
EXECUTE PROCEDURE TEST1 RETURN_VALUES :param/var, :etc...
You have to declare a couple of parameters or variables that will hold
the returning values.
And from your previous post about TEST1, you should most probably
use SELECT ... FROM TEST1
With regards,
Martijn Tonies
InterBase Workbench - the developer tool for InterBase & Firebird
Firebird Workbench - the developer tool for Firebird
Upscene Productions
http://www.upscene.com
"This is an object-oriented system.
If we change anything, the users object."
> END ^!then
> SET TERM ; ^!
>
> This didn't work (which is good actually). I want to write several
> stored procedures that can return different numbers of parameters,
> execute one or more of them in another procedure (TEST2) depending onquestions
> some input value(s).
>
> If you feel you have better things to do than answering all my
> I understand that...VarChar(50),
>
> Henrik
>
> Me again :)
>
> > I'm trying to execute a stored procedure within another stored
> > procedure. The first procedure looks like this:
> >
> > SET TERM ^! ;
> > CREATE PROCEDURE TEST1 returns (VAR_VARETYPE VarChar(50),
> VAR_LEVERANDOR
> > VarChar(50), VAR_ADRESSE1 VarChar(50), VAR_KONTAKTPERSON
> > VAR_TELLER Integer) ASparameter
>
> This procedure returns a couple of parameters.
>
>
> --8<-- snip
>
> > My second Stored procedure is:
> >
> > SET TERM ^! ;
> > CREATE PROCEDURE TEST2 AS
> > BEGIN
> >
> > EXECUTE PROCEDURE TEST1 ;
>
> Where does this get it's return parameters??
>
> btw, if you use SUSPEND, you should use SELECT.
>
> > END ^!
> > SET TERM ; ^!
> >
> > So my plan is simply to execute TEST1 in TEST2, but I get the
> following
> > error: "ISC ERROR MESSAGE: invalid request BLR at offset 24
> > mismatch for procedure TEST1"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/