Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Funny problem in PL/SQL

Funny problem in PL/SQL

From: Arati Vijay <vijayj_at_singnet.com.sg>
Date: Tue, 19 Oct 1999 23:31:42 +0800
Message-ID: <7ui33v$fg9$1@mawar.singnet.com.sg>

I have a function that reads the branch code from a table, depending on a function for the user, and sets it in an application context.

The code goes something like this




SELECT FUNCTION_NAME
INTO      l_func
FROM      USER_PROFILE
WHERE          USER_NAME = my_user;

SELECT    BRANCH_CODE
INTO      l_branch
FROM      USER_FUNCTION
WHERE          USER_FUNCTION = l_func;

predicate := 'BRANCH_CODE = ' || l_branch

DBMS_SESSION.SET_CONTEXT ('APPL', l_func, predicate);



This doesn't work, as it bombs out with the following

ORA-28106: input value for argument #2 is not valid ORA-06512: at "SYS.DBMS_SESSION", line 55

When I print out the values of l_func and predicate, they appear correct.  Further, the limits of 30 bytes and 256 bytes for arguments 2 and 3 are not reached.

However, when I add a

     l_func := l_func

just before the call to DBMS_SESSION.SET_CONTEXT, it goes through smoothly! Any clues?

Regards,
VJ Received on Tue Oct 19 1999 - 10:31:42 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US