If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > OUT/INOUT parameter in Procedure

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-31-08, 06:30
Aloke Maity Aloke Maity is offline
Registered User
 
Join Date: Jan 2008
Posts: 2
OUT/INOUT parameter in Procedure

Hi
I have created following procedure with OUT parameter, but it is not working.
Please help me to invoke the Procedure which has OUT parameter.



CREATE PROCEDURE SP_OUT_PARAM_1 (OUT p_ID INT)

LET p_ID = 99;
END PROCEDURE


CREATE PROCEDURE SP_OUT_PARAM_2 ()
DEFINE v_ID INT;

EXECUTE PROCEDURE SP_OUT_PARAM_1 (v_ID);

END PROCEDURE


Then when executing SP_OUT_PARAM_2 in DBAccess, following error shown--
9752: Argument must be a Statement Local Variable for an OUT/INOUT parameter


Then I have changed the argument of SP_OUT_PARAM_2 as follows

CREATE PROCEDURE SP_OUT_PARAM_2 ()

EXECUTE PROCEDURE SP_OUT_PARAM_1 (v_ID # INT);

END PROCEDURE

Now following error shown when compiling SP_OUT_PARAM_2

9781: SLV cannot be an argument to a function invoked explicitly by EXECUTE or CALL.

Thanks and Regards
Aloke
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On