Subject RE: [ib-support] Fw: Stored Procedure
Author Thomas Steinmaurer
Use a SUSPEND at the place where a record should be
returned to the client. For example:

SET TERM !!;
CREATE PROCEDURE MAXOFREFF
RETURNS (NUMIN CHAR(10)) AS
BEGIN
SELECT MAX(REFFNO) FROM STOCKIN WHERE STATUS='IN' INTO :NUMIN;
SUSPEND;
END !!
SET TERM ; !!

Regards,
Thomas Steinmaurer
IB LogManager 2.1 - The Logging/Auditing Tool for InterBase and Firebird
http://www.iblogmanager.com

> -----Original Message-----
> From: monalisa [mailto:monalisa@...]
> Sent: Sunday, September 29, 2002 11:52 AM
> To: ib-support@yahoogroups.com
> Subject: [ib-support] Fw: Stored Procedure
>
>
>
> ----- Original Message -----
> From: "monalisa" <monalisa@...>
> To: <delphi-programming@yahoogroups.com>
> Sent: Sunday, September 29, 2002 4:46 PM
> Subject: Stored Procedure
>
>
> > Hi All,
> > I need help with the simple Stored Procedure :
> >
> > I have Table STOCKIN with record :
> >
> > DATE REFFNO STATUS
> >
> > 1/1/2002 2002000001 IN
> > 1/2/2002 2002000002 IN
> >
> > I made Stored Procedure with this statement :
> >
> > SET TERM !!;
> > CREATE PROCEDURE MAXOFREFF
> > RETURNS (NUMIN CHAR(10)) AS
> > BEGIN
> > SELECT MAX(REFFNO) FROM STOCKIN
> > WHERE STATUS='IN'
> > INTO :NUMIN;
> > END !!
> >
> > SET TERM ; !!
> >
> > The operation execute successfully.
> > But when I call the procedure with :
> >
> > SELECT * FROM MAXOFREFF
> >
> > The return value always <NULL>
> >
> > So what's wrong with My Code ? I still use Interbase 6.01 with open souces
> > version.
> > Thanks for all helped !
> >
> > Regards,
> > Mona.
> >
> >
> >
> >
>
>
>
> 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/
>
>
>