Subject Access to Stored Procedure
Author Scott, Niall
Hi



I have created a stored procedure





CREATE PROCEDURE "TESTPROC"

RETURNS

(

"ID" CHAR(30) CHARACTER SET WIN1252

)

AS

DECLARE VARIABLE xpart VARCHAR(30);

DECLARE VARIABLE NewNum INTEGER;

BEGIN

NewNum = GEN_ID(CCPART_GEN,1);

xPart = Cast(Newnum as INTEGER);

WHILE (STRLEN(xPart)<6) DO

BEGIN

xPart = ('0'||xPart);

END

ID= ('CCS-'||Xpart);

EXIT;

END



My query is how do access this from my application or IbConsole

Using

SELECT ID FROM TESTPROC

activates the procedure and increments the generator but I get null as a
result.



T.I.A.



Niall R Scott
Systems Engineer
I.S. Support
Cameron Controls
Aberdeen
+44 1224 282440





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This e-mail is confidential, may contain proprietary information
of the Cooper Cameron Corporation and its operating Divisions
and may be confidential or privileged.

This e-mail should be read, copied, disseminated and/or used only
by the addressee. If you have received this message in error please
delete it, together with any attachments, from your system.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[Non-text portions of this message have been removed]