Subject | Re: [firebird-support] Stored procedures |
---|---|
Author | Martijn Tonies |
Post date | 2005-04-07T09:22:04Z |
Hello Andre,
ID INTEGER
(without quotes)
suspend further procedure execution and will continue if the client or
process fetching results from the procedue will ask for a new row. If
it doesn't do that, the procedure will not finish (when in a loop).
For procedures that don't have "suspend" in them, you can call them via
EXECUTE PROCEDURE <procedure> ( in parameters ) returning_values
:out1, :out2 etc...
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server
Upscene Productions
http://www.upscene.com
> I've made my first steps with stored procedures. The documentationEven easier:
> provides some simple examples like:
>
> ALTER PROCEDURE "F_GET_ID"
> RETURNS
> (
ID INTEGER
> "id" INTEGERid = 12931231;
> )
> AS
> BEGIN
> "id" = 1234567890;
(without quotes)
> ENDNo. A "suspend" make a stored procedure select-able. The engine will
>
> There is no syntax error, but I get no result set. So I read a little
> bit more the manual and find "suspend", and now:
>
> ALTER PROCEDURE "F_GET_ID"
> RETURNS
> (
> "id" INTEGER
> )
> AS
> BEGIN
> "id" = 1234567890;
> suspend; <<--------
> END
>
> it works.
>
> My Question: are all examples that I found wrong, or did I some mistakes?
suspend further procedure execution and will continue if the client or
process fetching results from the procedue will ask for a new row. If
it doesn't do that, the procedure will not finish (when in a loop).
For procedures that don't have "suspend" in them, you can call them via
EXECUTE PROCEDURE <procedure> ( in parameters ) returning_values
:out1, :out2 etc...
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server
Upscene Productions
http://www.upscene.com