DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Calling overloaded functions

Hybrid View

  1. #1
    Join Date
    May 2006
    Posts
    4

    Calling overloaded functions

    Hi, all

    How do I call an overloaded function in Oracle (9i)?

    I am trying:

    SELECT DBMS_OBFUSCATION_TOOLKIT.DESGETKEY ( 'XXXX' ) FROM DUAL

    and get a 'PL-307 too many declarations of 'DESGETKEY' match this call' error message.

    There is a version that takes and returns a varchar and another one that takes and retuns a raw.

    Thanks in advance.

    MP

  2. #2
    Join Date
    May 2005
    Location
    France
    Posts
    34
    I got the same problem with DBMS_OBFUSCATION_TOOLKIT.MD5... There are 2 functions : one for VARCHAR2 and the other for RAW, but Oracle can't make the difference between the two signatures !

    The solution is to use named parameters, but this is not supported in SQL : you have to call it from PL/SQL :

    Code:
    DECLARE
        strTmp VARCHAR2(100);
    BEGIN
        strTmp  := DBMS_OBFUSCATION_TOOLKIT.DESGETKEY ( seed_string => 'XXXX' );
        DBMS_OUTPUT.PUT_LINE(strTmp);
    END;
    /
    BTW according to the documentation , seed_string must be at least 80 characters long, so 'XXXX' won't work (I've tested with more than 80 "X" and it works ).

    HTH & Regards,

    rbaraer

  3. #3
    Join Date
    May 2006
    Posts
    4
    Thanks. It helps.

    MP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width