Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Stored Proc to return a Generator ...

0 views
Skip to first unread message

Nick Rambarransingh

unread,
Nov 23, 2000, 3:00:00 AM11/23/00
to
Good Day All,

I am trying to get a stored procedure to return the value of a
generator. The Store Proc looks like this:

COMMIT WORK;
SET AUTODDL OFF;
SET TERM ^ ;

/* Stored procedures */

CREATE PROCEDURE "NEWOBJECTID"
RETURNS
(
OBJECTKEY INTEGER
)
AS
BEGIN EXIT; END ^


ALTER PROCEDURE "NEWOBJECTID"
RETURNS
(
OBJECTKEY INTEGER
)
AS

BEGIN
ObjectKey = GEN_ID(KeyCode, 1);
Exit;
END
^

SET TERM ; ^
COMMIT WORK;
SET AUTODDL ON;

The KeyCode generator gets updated, however, this proc does not return
any values. What am I missing. I am using IBAccess as the DBMS tool.

Thanks, Nick
Borland Forever ...


Gerrit Stegehuis

unread,
Nov 27, 2000, 3:00:00 AM11/27/00
to
Maybe replace 'Exit;' by 'Suspend;' and retrieve the value by (the
IBAccess equivalent of) 'select ObjectKey from NewObjectId'.
Gerrit

Nick Rambarransingh schreef:

0 new messages