I am using Oracle Forms 6i with Oracle db 10g on a Windows machine, in a form, when i click on a button, the trigger WHEN-BUTTON-PRESSED is launched calling a function of a package in the database, Here is the PL/SQL code for both the trigger and the function:
The function:
Function test_function (code Varchar2) RETURN Varchar2 IS
BEGIN if code IN ('Y') then
return('Yes');
else
return('no');
endif;
END;
The trigger:
DECLARE
message_test varchar2(20);
BEGIN
message_test := pkg_test.test_function('Y');
message('the message is: ' || message_test);pause;
END;
My problem here is that it doesn't show anything, but when i write pkg_test.test_function('Y') in sql*plus or in SqlDevelopper it shows 'Yes' as a result,
Or when i change message_test := pkg_test.test_function('Y'); with select pkg_test.test_function('Y') into message_test from test; it works also.
what might be the cause of that?
PS: this is just a test code, the actual code is more complex than that.