Subject | Re: [firebird-support] Re: Stored procedures |
---|---|
Author | Martijn Tonies |
Post date | 2005-04-08T08:28:46Z |
> Yes, you need to use a suspend call to return a value, so any examplesNo... use SUSPEND if you intend to use the procedure with
> you have found that do not use the suspend call (to output the value)
> are wrong.
>
> Suspend basically tells Firebird to output one line with the values
> that are currently in the output variables. Do not use suspend if your
> stored procedure returns no result. Always use suspend if your stored
> procedure returns one or more results.
SELECT. Do not use SUSPEND if you [return a single result and]
intend to use the procedure via EXECUTE PROCEDURE or a
procedure component in Delphi.
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server
Upscene Productions
http://www.upscene.com
> Be very careful of this. I spend about 3 hours the other day looking
> for a bug in some stored procedures I had written. It turned out that
> I had forgotten to include the suspend, so the variable that had the
> timestamp inside the stored procedure (confirmed by call to
> OutputDebugString) was not returning it to the other Stored Procedure.
> It is very easy to forget.