Forum Stats

  • 3,838,230 Users
  • 2,262,342 Discussions
  • 7,900,547 Comments

Discussions

can some one explain me this

2

Answers

  • Aravind Kumar Sekar
    Aravind Kumar Sekar Member Posts: 27
    edited Sep 16, 2015 2:29AM

    i used different alphabet but its showing error..

    can we use any other alphabet other than v ?

  • KayK
    KayK Member Posts: 1,723 Bronze Crown
    edited Sep 16, 2015 2:43AM

    That's what i fear, the database doesn't know this APEX function or even your user hasn't the rights to use this function.

    Try this

    SELECT *
      FROM all_objects   -- or dba_objects if you have access to this
     WHERE object_name = 'V';
    
    

    If you don't have access to v then you can try to work without it:

    :new.created_by := user;

    That works without APEX.

    regards
    Kay

  • Aravind Kumar Sekar
    Aravind Kumar Sekar Member Posts: 27
    edited Sep 16, 2015 3:09AM

    :new.created_by := nvl(t('APP_USER'),user);

    here i used "t" but its showing error as


    Compilation failed, line 7 (12:33:48) The line numbers associated with compilation errors are relative to the first BEGIN statement. This only affects the compilation of database triggers.

    PLS-00201: identifier 'T' must be declaredCompilation failed, line 7 (12:33:48) The line numbers associated with compilation errors are relative to the first BEGIN statement. This only affects the compilation of database triggers.

    PL/SQL: Statement ignored

  • KayK
    KayK Member Posts: 1,723 Bronze Crown
    edited Sep 16, 2015 3:35AM

    your database user who create your trigger doesn't see the function v or t or he isn't allowed to execute it.

    Have a look at all_objects.

  • Chris Hunt
    Chris Hunt Member Posts: 2,066 Gold Trophy
    edited Sep 16, 2015 3:40AM

    Amazing. You put random letters into your code, and Oracle doesn't automatically translate them into functions which do whatever it is you want them to do. Who would have guessed that?

    Aravind Kumar SekarKayKWilliam Robertson
  • AndrewSayer
    AndrewSayer Member Posts: 13,007 Gold Crown
    edited Sep 16, 2015 3:52AM

    Where did 't' come from? Error says there is no such thing as 't'.

    What was wrong with v? What errors were you getting? What do you even want this trigger to achieve? And if you're feeling super helpful, what version of Oracle is this? What version of apex are you using?

    William Robertson
  • BluShadow
    BluShadow Member, Moderator Posts: 42,122 Red Diamond
    edited Sep 16, 2015 4:24AM
    KayK wrote:
    
    will this APEX function work on a pure database trigger and will it be accessible ?
    I'm coming from Forms 4.5 (20 years ago) and have only a little knowledge of APEX.
    

    If the trigger or procedure is called from within an Apex application session, then yes the v functions will work just fine.  If they're called from a regular session then they will return null.

  • BluShadow
    BluShadow Member, Moderator Posts: 42,122 Red Diamond
    edited Sep 16, 2015 4:26AM
    2848515 wrote:
    
    i used different alphabet but its showing error..
    can we use any other alphabet other than v ?
    

    No.  the "v" functions are specific to Apex application environment.  You cannot just randomly pick any letter and expect it to work, unless you've specifically created functions (or have access to functions) with that name.

    Aravind Kumar Sekar
  • Aravind Kumar Sekar
    Aravind Kumar Sekar Member Posts: 27
    edited Sep 16, 2015 4:39AM

    i just tried with other letters will they work or not ?

    that's it...

  • AndrewSayer
    AndrewSayer Member Posts: 13,007 Gold Crown
    edited Sep 16, 2015 4:44AM

    No, random letters will not work unless you have a function named by that random letter.

    William Robertson
This discussion has been closed.