Sign Up

❇️ OrclQA.Com is a question and answer forum for programmers.
❇️ Here anyone can ask questions and anyone can answer to help others.
❇️ It hardly takes a minute to sign up and it is 100% FREE.

Have an account? Sign In


Have an account? Sign In Now

Sign In

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now
Sign InSign Up

OrclQA.Com

OrclQA.Com Logo OrclQA.Com Logo

OrclQA.Com Navigation

  • Oracle
  • Oracle Apex
  • Python
  • Questions
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Ask Question
  • Add Post
  • Oracle
  • Oracle Apex
  • Python
  • Questions
Huy Nguyen
Huy Nguyen

Huy Nguyen

  • 6 Questions
  • 17 Answers
  • 0 Best Answers
  • 67 Points
View Profile
  • 0
Huy NguyenProfessional
Asked: March 30, 20212021-03-30T12:25:05+05:30 2021-03-30T12:25:05+05:30

Check function on the web of oracle apex is not working

  • 0

Hi everyone, I have a function on DB with code below as:
begin
-- Call the function
:result := WFL_PKG.Check_Validate_Action(P_TRAN_ID => :P_TRAN_ID,
P_User_Name => :P_User_Name,
P_Action_Type => :P_Action_Type,
P_DAYS => :P_DAYS);
end;
When I test it by my parameter, it returns 'TRUE'. It is right for me. But when I check it on the web with the same parameter, it returns FALSE.
Now I see when P_DAYS is interger like 1.0, 2.0, 3.0,.. DB and web return same value, when P_DAYS is float like 0.5, 1.5,... DB returns right value while web return false value. I use the function on server-side condition and I test many type of server-side condition, it still has wrong value. Anyone can suggest me to solve that problem?

question
  • 2
  • 53
  • 0
  • 0
  • Share
    • Share on Facebook
    • Share on Twitter
    • Share on LinkedIn
Answer

2 Answers

  1. Vinish Kapoor

    Vinish Kapoor

    • 1 Question
    • 727 Answers
    • 63 Best Answers
    • 4k Points
    View Profile
    Vinish Kapoor Enlightened
    2021-03-30T14:14:31+05:30Added an answer on March 30, 2021 at 2:14 pm

    If you are using this PL/SQL code then are you submitting the page items you have used to call the function? If not then specify it.

    Also, try to get the result in a variable and then compare it. Below is an example:

    declare
    result boolean;
    begin
    -- Call the function
    result := WFL_PKG.Check_Validate_Action(P_TRAN_ID => :P_TRAN_ID,
    P_User_Name => :P_User_Name,
    P_Action_Type => :P_Action_Type,
    P_DAYS => :P_DAYS);
     if result then
        -- do something if true
     else
        -- do something if false
     end if;
    end;
    • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
    • Huy Nguyen

      Huy Nguyen

      • 6 Questions
      • 17 Answers
      • 0 Best Answers
      • 67 Points
      View Profile
      Huy Nguyen Professional
      2021-03-30T15:23:27+05:30Replied to answer on March 30, 2021 at 3:23 pm

      Thank for your idea. But that function I return varchar2, can not to change type. So I can't check your function in my apps. I test that select statement
      select 0.5 from dual;
      On Db, it returns 0.5 while on oracle apex returns .5. I think the problem starts from here.

      • 0
      • Share
        Share
        • Share on Facebook
        • Share on Twitter

You must login to add an answer.

Forgot Password?

Sidebar

Explore

  • Ask Question
  • Add Post

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
© 2022 OrclQA.Com. All Rights Reserved.
Privacy Policy - About Us