Subject Returning a value from a Stored Procedure
Author Tim
Hi Everyone,

How would I return a value from a Stored Procedure?

Assume I have the following metatdata, how do I get the SP to return
the Recordno to me? :

CREATE GENERATOR GEN_1;

CREATE TABLE TABLE1
(
RECORDNO INTEGER NOT NULL,
FIELD1 VARCHAR(32),
PRIMARY KEY (ERECORDNO)
)

CREATE TRIGGER INS_TABLE1
AS
BEGIN
NEW.RECORDNO = GEN_ID(GEN_1, 1);
END;

CREATE PROCEDURE INSERTPROCEDURE
(
FIELD1 VARCHAR(32)
)
RETURNS
RECORDNO INTEGER
AS
BEGIN
INSERT INTO TABLE1
(FIELDONE)
VALUES
:FIELD1;
END

TIA

Tim