AnsweredAssumed Answered

Capturing a value returned by a stored procedure using GEL

Question asked by Plidian on Jun 19, 2012
Latest reply on Jul 20, 2012 by markl_af
Folks,
I've looked at a lot of different posts that are similar to this but have not been able to get anything to work.
I had this code working with a MSSQL server

sql:update dataSource="${clarityDS}" var="nextId" escapeText="false">
{ call clarity.cmn_id_sp('PRJ_OBS_ASSOCIATIONS',NULL,1,NULL) }
</sql:update>

But the same code on oracle generates a bevy of errors depending on what I change.

The below code I used got me around the errors. However I can't figure out how to get the value out.

<sql:update dataSource="${clarityDS}" var="nextId" escapeText="false">

DECLARE


TABLENAME VARCHAR2(32767);


OUTPUT NUMBER;

BEGIN


TABLENAME :='PRJ_OBS_ASSOCIATIONS';

cmn_id_sp(TABLENAME,OUTPUT,1,NULL);

COMMIT;

END;
</sql:update>
${nexId} currently displays "1"

The OUTPUT oracle variable isn't being returned with the current code. Am I coming at this from the wrong direction?

This is being used as part of a auto initiated process within the application.

Outcomes