Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Funny problem in PL/SQL
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
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