How to call a function whose name is stored in the table?

Dear members,

I have a function with return number and store its name in a table.

now, I want to choose the name of this table function and run it and return the value of a variable in my form.

Here is my code in when pressed to release button.
DECLARE
     v_value number;
     V_FUNC VARCHAR2(100);
     V_PARAM VARCHAR2(100);
begin
     select FUNCTION_NAME, PARAM 
     INTO V_FUNC, V_PARAM
     from function_table
     where id =1;
      
     message('V_FUNC='||V_FUNC); pause;
     v_value := v_func||';'; --run_tb_function;
     :text01 := v_value;
end;
This code gives the following error:

ORA-06502


with regard to:

Published by: user2040934 on February 2, 2013 09:47

You can use EXECUTE IMMEDIATE to call pl/sql dynamic. But you need to wrap it in a db procedure.

BTW... What is the reason of this dynamic approach, as it is very unusual?

Tags: Oracle Development

Similar Questions

  • Diagram of authentication with user name / password stored in the Table of the App

    Hi all

    So far, all of our applications have used sign-ON, but I have now spread to allow users from outside of our Organization (and so not in our system OID) to use a specific application.

    So, I have a table in my application that stores the user name and password. I have a function that compares the input of user name and password at this table and returns a Boolean result. This function is then entered in my scheme of authentication as the authentication function.

    This works well and is causing no problem. The problem is that the password is stored and verified to plain text - not very good lie.

    How can I do to change the password of my table column, pages which allow the password to be updated, and authentication which checks the user name / password to use a form of encryption?

    Also, do I need to worry about all the other fields (Page Sentry function to check the authentication session, prerequisite process etc.) that the authentication scheme can offer me - or can I just leave these virgins as they are now.

    If someone can give me a complete "out-of-the-box" solution that would be wonderful - otherwise a good hard pusj in the right direction would be much appreciated.

    Thank you very much
    Martin

    Hello Martin,

    If you discover here the application of Discussion Board, you should find the information you need. This application stores an encrypted version of the password of the user in the table.

    http://www.Oracle.com/technology/products/database/application_express/packaged_apps/packaged_apps.html#Forum

    Good luck
    Don.

    You can reward this answer by marking as being useful or correct :)

  • How to call a function stored in ADF

    How to call a function stored in the ADF?

    Example of function:

    create or replace

    FUNCTION SF_HELLOWORLD

    (

    NAME IN VARCHAR2

    ) RETURN VARCHAR2 AS

    BEGIN

    DBMS_OUTPUT. ENABLE (500000);

    DBMS_OUTPUT. Put_line (' Hello ' |) NAME | ", YOUR ATTEMPT IS SUCCESSFUL");

    -OUTPUT: = 'Hello'. NAME | ', YOUR ATTEMPT IS SUCCESSFUL;

    RETURN 'Hello'. NAME | ', YOUR ATTEMPT IS SUCCESSFUL;

    END SF_HELLOWORLD;

    ADF Code example:

    try {}

    System.out.println ("* beginning of the code *");

    String sql = "declare VARCHAR2 (2000) WISH;" begin to DESIRE: = SF_HELLOWORLD(:NAME); : WISH: = WISH; end; ";

    CallableStatement st = getDBTransaction () .createCallableStatement (sql, getDBTransaction(). DEFAULT VALUE);

    st.setObject ("NAME", "ABC"); replace the ABC with required param

    st.registerOutParameter ("WISHES", Types.VARCHAR);

    St.Execute ();

    System.out.println ("the output of the function DB is:" + st.getObject ("WISHES"));

    System.out.println ("* end of code *");

    } catch (Exception e) {e.printStackTrace () ;}

  • How to call a function in class library?

    Hi all

    Anyone know how to call a function in a library project?

    I have to call using a resource file in a library of a CLDC project project.

    So I write a simple test library and tried to access a function in my CLDC application.

    I tested with 2 following projects.

    1. a library project: TivitFirm

    Sorry I can't answer this from the point of view of the eclipse, I use JDE.  But I suspect that the approaches are similar, even if the detail is different, so maybe this will help you.

    In JDE, you have two options:

    (a) use a jar

    (b) create a dependent project

    (a) I usually use a jar.  So to do this I have a workspace is the library, I compile this, then in my project that uses it, I add the jar to build settings

    (b) in this case, you have two projects in the space of a job, and you say the main project that it is dependent on the library project.

    I hope this helps.

  • How to call a function plugin with command line parameters

    I wrote a plugin that processes an open document. The treatment can be started by selecting a menu item in Acrobat. To start the processing of the command line, I also wrote a small Visual Basic executable file that currently a bit activates the menu command. However, I now have to pass some parameters to the plugin. I managed to call a function plugin with settings by loading the .api as a library file in the VB executable. But it seems that the entire Acrobat SDK functionality is not initialized in this way. So I can't work with the PDF file. How can I call my function plugin with settings in Acrobat? Thomas

    You must establish a form of IAC (communication monitor) of your VB application with your plugin.

    Whether COM, DDE, IPC, named pipes, shared memory files share, etc. is to you...

  • How to call a function within a movieclip on the main timeline in CC animate canvas?

    Hello world...

    In AS3: Function (fnc name: myFunction) inside a Movieclip (mc1). I'll call you timeline mc1.myFunction ();

    But how to call AnimateCC canvas?

    If you have an instance of MovieClip named "mc" with the following code in to:

    This.Fun = function() {}

    Alert ("Hey!");

    }

    You can call this function (increased to 'this' within the MC) using the oon following the main timeline:

    var root = this;

    this.mc.addEventListener ("click", function() {}

    Console.log (root.mc.fun ());

    });

  • How to remove a file whose name name is too long.

    Hi, a simple q for someone.

    I deleted a bunch of files and a rest.

    How can I delete a file whose name is too long?

    I can't delete it, even with some administrator privs.

    I tried to do in a powershell window, but does not use the correct flags.

    Repeat the same message.

    Too long to go to the bin file name.  Shorten the name and try again.

    Any advice.

    Thanks in advance.

    Try using 7z (7-Zip) to rename or delete the file.

  • How to call external functions without one. DLL (just using a.) H and. LIB file)?

    Hi all

    in fact, I am facing difficulties on how to get an external function is called in CVI (Version 2009).

    I was delivered with a. H file and a. LIB file to call an external function of my project CVI. The. H file looks like this:

    void exportedFunction(double *parameter);
    

    As far as I know, the external function was written with MS Visual C++ 6.

    So, I tried to link statically to the al extern like this function:

    -Add the. H file and the. LIB file to the CVI project

    -#include the. Folder H when I needed to call the external function

    -do the external function call

    During construction I get unresolved CVI external function call error, so this seems not work.

    I did some research autour and stood up with two possible problems. Maybe one of you can help me get a bit further and do work things out.

    (1) of the code of the 'real' function inside the DLL file that was not delivered to me. Or y at - it a way to get concrete results (calling external functions) with just one. H and a. LIB file (with none. Included DLL file)?

    (2) the external function does not export according to the rules of Style 'C '. The signature of the function in the. H file shows some things don't like

    extern "C" __declspec(dllexport) void __stdcall ...
    

    Or maybe it's a combination of these two issues (missing. DLL + bad export style function)?

    I guess I could get around the incorrect service export style when I managed to write a wrapper around the original function that actually uses Style C exporters. But I guess I need to the. DLL file for this test as well.

    Thank you very much for your answers.

    Best regards

    Bernd

    There is no need for the stuff of dllexport. There is also the option of a static library without any DLL.  But the "extern"C"' is essential, because it forces the C++ compiler, which was probably used to compile the library to use the C calling convention.

    If you are unable to ask the library vendor to provide a version that was compiled using C calling convention is the way to write a wrapper with VC ++ 6 around this library that functions using C calling convertion reexports. Something like

    extern 'C' myfunc1 type0 (type1 arg1,...) {

    Back to func1 (arg1,...);

    }

    for each function, you must use.

    BTW. "unresolved symbol" is the error message from the linker, you can expect if you try to bind the C code against a generation of library with the C++ calling convention.

  • How to call a function in c ++ QML?

    Hi all

    In my application, I saw two QML and a class of CPP.

    Saying one of my root qml: main.qml is a root page, which displays a list. And the line of the list is an another qml (Customrowlist). And I put the contextProperty for main.qml in the PRC and I need to call a function in the PPC of

    Customrowlist.QML.

    I want to call the deleteAccountData(..,..,..) function. Customrowlist.qml, so how can I do.

    Here is my code

    hand. QML

            TabbedPane {
    
                //property Page about
    
                id: tabbedPane
                showTabsOnActionBar: true
    
                Tab {
                    title: "Manage Accounts"
                    onTriggered: {
                        objectAM.fetchAccountData();
                    }
                    imageSource: "asset:///images/list.png"
                    NavigationPane {
                        id: navPane
                        Page {
                            Container {
                                background: back.imagePaint
                                layout: StackLayout {
                                }
                                ImageView {
                                    imageSource: "asset:///images/head.png"
                                    scalingMethod: ScalingMethod.AspectFit
                                    opacity: 1.0
                                }
                                ListView {
                                    id:savedaccount
                                    objectName: "savedaccount"
                                    listItemComponents: [
                                        ListItemComponent {
                                            type: "item"
                                            CustomListRow {
                                            }
                                        }
                                    ]
                                }
                            }
                            actions: [
                                ActionItem {
                                    id: about
                                    title: "About"
                                    imageSource: "asset:///images/info.png"
                                    ActionBar.placement: ActionBarPlacement.InOverflow
                                    attachedObjects: [
                                        ComponentDefinition {
                                            id: aboutPageMA
                                            source: "about.qml"
                                        }
                                    ]
                                    onTriggered: {
                                        var profilePage = aboutPageMA.createObject();
                                        navPane.push(profilePage);
                                    }
                                },
                                ActionItem {
                                    id: help
                                    title: "Help"
                                    imageSource: "asset:///images/help.png"
                                    ActionBar.placement: ActionBarPlacement.InOverflow
                                    attachedObjects: [
                                        ComponentDefinition {
                                            id: helpPageMA
                                            source: "Help.qml"
                                        }
                                    ]
                                    onTriggered: {
                                        var profilePage = helpPageMA.createObject();
                                        navPane.push(profilePage);
                                    }
                                },
                                ActionItem {
                                    id: settings
                                    title: "Settings"
                                    imageSource: "asset:///images/settings.png"
                                    ActionBar.placement: ActionBarPlacement.InOverflow
                                    attachedObjects: [
                                        ComponentDefinition {
                                            id: settingsPageMA
                                            source: "Settings.qml"
                                        }
                                    ]
                                    onTriggered: {
                                        var profilePage = settingsPageMA.createObject();
                                        navPane.push(profilePage);
                                    }
                                }
                            ]
    
                        }
                    }
                }
    
                attachedObjects: [
                    GroupDataModel {
                        id: feedsDataModel
                        sortingKeys: ["text"]
                        sortedAscending: false
                        grouping: ItemGrouping.None
                    },
                    DataSource {
                        id: feedsDataSource
                        source: "mydata.json"
                        type: DataSource.Json
                        onDataLoaded: {
                            feedsDataModel.clear();
                            feedsDataModel.insertList(data);
                        }
                        onError: {
                            console.log("Error Occured" + errorMessage);
                        }
                    },
                    ImagePaintDefinition {
                        id: back
                        repeatPattern: RepeatPattern.XY
                        imageSource: "asset:///images/bg.jpg"
                    }
    
                ]
            }
    

    My Customlistrow.qml

    import bb.system 1.0
    import bb.cascades 1.0
    import bb.data 1.0  
    
          Container {
                layout: AbsoluteLayout {}
                Container{
                    id: usr
                    layoutProperties: AbsoluteLayoutProperties {
                        positionX: 0.0
                        positionY: 0.0
                    }
                    background: Color.create ("#ffffff")
                    preferredWidth: 768
                    preferredHeight:120
                    Container{
                        layout: AbsoluteLayout {}
                        ImageView {
                            id:accountimg
                            imageSource: ListItemData.account
                            preferredWidth: 78
                            opacity: 1.0
                            layoutProperties: AbsoluteLayoutProperties {
                                positionX: 10.0
                                positionY: 16.0
                            }
                        }
                        Label {
                            id: username
                            text: ListItemData.username
                            textStyle.base: SystemDefaults.TextStyles.TitleText
                            multiline: true
                            textStyle.color: Color.Black
                            textStyle.textAlign: TextAlign.Left
                            layoutProperties: AbsoluteLayoutProperties {
                                positionX: 110.0
                                positionY: 25.0
                            }
                        }
                        ImageButton {
                            defaultImageSource: "asset:///images/delete.png"
                            pressedImageSource: "asset:///images/deletepressed.png"
                            preferredWidth: 78
                            opacity: 1.0
                            layoutProperties: AbsoluteLayoutProperties {
                                positionX: 680.0
                                positionY: 16.0
                            }
                            attachedObjects: [
                                SystemToast {
                                    id: myQmlToast
                                    body: username.text
                                }
                            ]
                            onClicked: {
                                myQmlToast.show()
                                objectAM.deleteAccountData(username.text,password.text,"asset:///images/twitter.png");
                            }
                        }
                        Divider {
                            layoutProperties: AbsoluteLayoutProperties {
                                positionX: 0.0
                                positionY: 118.0
                            }
                        }
    
                    }
    
                    gestureHandlers: [
                        LongPressHandler {
                            onLongPressed: {
                                id:finalx.play();
                                secondcontainer.visible = true;
                            }
                        }
                    ]
    
                    onTouch: {
                        if (event.isUp ()){
                            initialx.play();
                            secondcontainer.visible = false;
                        }
                    }
    
                    animations: [
                        FadeTransition {
                            id:finalx
                            toOpacity: 0
                            duration: 300
                        },
                        FadeTransition {
                            id:initialx
                            toOpacity: 1
                            duration: 300
                        }
                    ]
                }
            }
    

    in my PPC

    QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);
    qml->setContextProperty("objectAM",this);
    
    void AccountManager::deleteAccountData(QString user,QString pass,QString imgSource){
    SystemToast *toast = new SystemToast();
    toast->setBody("Entered delete account!!!");
    toast->show();
    }
    

    I got your problem. Your CustomListrow does not receive the reference to your context "objectAM".

    Please update your main.qml with the following... function and store the reference to the global object and then from your call of customListRow as "Qt.objectAM.deleteAccount ();

    In the hand. QML on finished creation

    onCreationCompleted: {}
    Qt.objectAM = objectAM;
    }

    In CustomListRow...

    onClicked: {}
    myQmlToast.show)
    objectAM.deleteAccountData (username.text, password.text, "asset:///images/twitter.png");
    Qt.objectAM.deleteAccountData ("Me", "pwd", "asset:///images/twitter.png");
    }

    Hope it will work.

    Thank you

  • How to call a function in another function?

    When I press a button, I want a series of functions to be performed one after the other (they contain interpolations, but its not relevant) , all of them waiting for the previous must be filled. I want to put the series of functions within a function, so I can simply call this function to run all others. Animations work well, but I don't know how to call functions of in another function. It would also be necessary each function to wait until the previous one is complete, to run. This is a clear example of what I need to do:

    boton.onPress = animate;

    Function animate () {}

    Animation1 (onComplete: animation2);

    animation2 (onComplete: animation3);

    animation3;

    }

    Function () {Tween 1} animation1;

    Function () {Tween 2} animation2.

    Function animation3 () {Tween 3};

    any suggestions?

    which isn't really make sense unless you're tweening or do something of asynchronous (such as loading a file).

    Function b (): Void {}

    C() ;

    D() ;  C() executed when this line runs

    }

  • How 2 call a function db pls. ???

    Hello

    I created a function of db, I don't know how 2 call form
    CREATE OR REPLACE Function Balance_quantity_update    ( V_STORE_ID  IN NUMBER  ,  V_ITEM_SERIAL IN NUMBER   )
       RETURN NUMBER IS
        cnumber NUMBER;
        CURSOR CR_UPDATE  IS
    
        SELECT NVL( MAX( BALANCE_QTY ) , 0  )
         FROM WH_T_ITEMS
        WHERE STORE_ID    =  V_STORE_ID 
         AND    ITEM_SERIAL  = V_ITEM_SERIAL ;       
    BEGIN
    OPEN CR_UPDATE  ;
    FETCH CR_UPDATE   INTO cnumber;
    IF CR_UPDATE%notfound then     NULL ;
    ELSE
    
    LOOP
    
      UPDATE  WH_T_ITEMS
            SET    BALANCE_QTY          =  cnumber 
            WHERE  WH_T_ITEMS.STORE_ID  =  V_STORE_ID
            AND    ITEM_SERIAL          =  V_ITEM_SERIAL;    
    
    END LOOP ;
    END IF;
    
    CLOSE CR_UPDATE  ;
    RETURN cnumber;
    EXCEPTION
    WHEN OTHERS THEN
          raise_application_error(-20001,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM);
    END Balance_quantity_update; 
    /
    Can someone help me pls...

    Kind regards

    Abdetu...
    DECLARE
      vRetVal NUMBER;
    BEGIN
      vRetVal:=Balance_quantity_update(Pass_Store_ID, Pass_Item_Serial);
    END;
    

    -Clément

  • How to call a function in an article?

    Hello
    I have a question where I want to call a function that returns a different value to the runtime in r/o of the value of the element.

    so, how can I call a function?

    Thank you

    Hello

    If you want to enter data into the point and display the result at this point itself?
    Or data recovery database, and you want to pass this value to the function and display the result in the point?

    If your condition is 2, then in writing to trigger after QUERY ,

    :. := (:.);
    

    And if your condition is 1, then you can do in 2 ways,

    (1) If you don't want to see the data entered and want to replace it with the data entered.

    write in the FOLLOWING ELEMENT KEY trigger

    :. := (:.);
    

    (2) If you want to see two values,

    Then, you must add 1 point more and in the properties of the new item defined as in my first post.

    Kind regards

    Manu.

    If my answer or the answer to another person has been useful or appropriate, please mark accordingly

  • How to call a function that returns a SYS_REFCURSOR?

    Here's the situation.
    If I use ODP. NET to get a REF_CURSOR of a procedure in a package that it works without a hitch.

    If I use ODP .NET to run an Oracle function that returns a REF CURSOR, all sorts of things fool you.
    I use .NET 3.5 and ODP .NET version 2.112.1.2 (11 G). My Oracle database is 9.2.0.7.0

    There is this function returns a REF CURSOR.
    The code looks something like this.
    CREATE OR REPLACE FUNCTION SENDMEAREFCURSOR RETURN SYS_REFCURSOR IS
      X_REF genPkg.genericcursor;
    BEGIN
      OPEN X_REF for
        SELECT customer_id, name FROM CUSTOMERS;
      Return X_REF;
    END;
    .NET code looks like this. It's after a few adjustments.
            private static OracleDataReader FireMyFunc(OracleConnection oc)
            {
                try
                {
                    OracleCommand cmd = new OracleCommand();
                    cmd.Connection = oc;
                    //cmd.CommandText = "SELECT sendmearefcursor FROM DUAL";
                    //cmd.CommandType = System.Data.CommandType.Text;
                    cmd.CommandText = "sendmearefcursor";
                    cmd.CommandType = CommandType.StoredProcedure;
                    OracleParameter prm = cmd.CreateParameter();
                    prm.OracleDbType = OracleDbType.RefCursor;
                    prm.ParameterName = "returncurse";
                    prm.Direction = ParameterDirection.ReturnValue;
                    cmd.Parameters.Add(prm);
                    cmd.ExecuteNonQuery();
                    return (OracleDataReader) prm.Value; //Throws an UnableToCast exception.
                }
                catch (System.Exception ex)
                {
                   Console.WriteLine(String.Format("FireMyFunc: {0}",ex.ToString()));
                    throw;
                }
            }
    What should I do to get the refCursor?

    Hello

    You can use the GetDataReader of the OracleRefCursor object to return the datareader object.

    OracleRefCursor rc is prm (OracleRefCursor). Value;
    return of rc. GetDataReader();

    HTH
    Jenny

  • How to call a function

    As part of my attempts to make 508 compatible FLEX, I tried several things.  But this question is based on the FLEX in general.  What I'm trying to do is to call a routine (that will one day work and make FLEX compatible I hope).  Here is the basic provision in the mxml file:

    "< mx:Script source="/scripts/FSUtil.as "/ >
    "< mx:Script source="/scripts/FSCalc.as "/ >
    "< mx:Script source="/scripts/FSLangSwitch.as "/ >

    < mx:Script >
    <! [CDATA]
    accessibleSet();
    []] >
    < / mx:Script >

    "accessibleSet" is located in the FSUtil.as file.  The error in the above invocation is:

    1180: call to a method may be undefined accessibleSet.

    This is what it looks like (note the code creates an error):

    public function accessibleSet (): void {}
    headerDHSImage.accessibilityProperties.description = 'Logo of the State of Illinois Department of Human Services';
    }

    The error is:

    1120: access of undefined property headerDHSImage.

    But I do not think that the basic idea of a section of a mxml file script function call is affected by this.

    Just to be complete, headerDHSImage is defined in an element called DHSHeader.mxml as:

    < mx:Image id = "headerDHSImage".
    source = "images/DHSLogo.gif"
    toolTip = "State of Illinois Human Services Logo Department"
    left = "5" top = "5" / >

    This pane appears when the application runs, so I know that the connection is working.

    Recap:

    I want to call a function from the script of a mxml file box, but am unsure of the Protocol.

    Thank you

    Jerry

    > If I understand at all, and then in the mxml tag application you can make reference to the functions

    > under the control of a bare script tag (only locally).  In other words, you cannot refer to a function

    > It's in a script file associated through the script source method.

    No, this is incorrect. There is no difference between the declaration of a function like accessibleSet() in the

    If you do, it becomes in fact part of an initialization method ("cinit") of the generated class automatically emitted by the compiler, which is not what you are pregnant, because at class initialization time no instance does still exist, and you can only read and write static vars.

    Another way to understand is this: when you write a MXML file, you write a class. For example, suppose you write MyApp.mxml as

    accessibleSet();

    It is more or less equivalent to the writing of the class AS

    public class MyApp extends Application

    {

    accessibleSet();

    var b:Button = new Button();

    }

    If you are familiar with writing classes, you should see the problem here: a class body contains normally no loose function calls or other loose statements. Instead, a body of the class is supposed to contain 'const', 'var', and 'function' declarations. If you must call a method like accessibleSet() inside another method - for example, an event handler - which takes place in a time of well defined.

    BTW, you're probably going to confuse you more if you continue to crack your code for a single application have multiple files that you can include with

  • How to call a function in a component when selected some viewStack

    K I'm sure my way around this is to use a custom event, but maybe someone out there knows different.

    This is my layout views

    MainApp > allVideos > video - videoPlayer component

    OK I'll allVideos select my video viewsStack video display past init() is called on sends complete to create a property to my videoPlayer component and everything works well.

    Now I navigate back to allVideos and select a new video, we go back to the view of videos and I need a way to call init() again so I can send my new property to my component to play the new video. Complete creation is not called again.

    I was reading about the currentStateChange or currentStateChanging event. I don't really understand how those who work. So I assumed that custom events are the way to go? Thanks guys and influence is grateful.

    The 'show' event should work, be aware that the docs say that

    Distributed in the case of State of an object changes from invisible to visible.

    If you try to call something in the first display (such as a request to load data)

    You may need to use creationComplete also...

    https://bugs.Adobe.com/jira/browse/SDK-14158 has more information

Maybe you are looking for

  • Equium M50-244 has bluescreens and password requested

    Hi allI need your help here please, my wife Equium M50-244 just froze after 15 min. I thought out the battery could solve the problem, only now when you turn on the laptop I get blue screen and a request for password that was not supplied with the co

  • Problem with external monitor when used with the Satellite P100-434

    I'm trying to use a Vizitron L - 151 monitor flat screen connected to the VGA port on the back of my Satellite P100 - 434 (PSPADE) I find that the screens seem to periodically - feeding cycle windows resize themselves and then the screens settle down

  • Operating simultaneously two independent applications of LV

    I'm sure that many other people have had similar questions to this, but I can't find anything specific in the forums... I have a test system that runs two applications of BT. One is written by me, and as a loader .exe that calls then runs a main VI.

  • Unable to record

    After the update of lolipop 5.1.1 I am unable to create the folder in Xperia Z3

  • What processor can I go to for studio xps 7100.

    What is the fastest I can put in?  I guess that the 1090 t that I saw that some 7100 is sold with?   Not the 1100t even if I guess? Is there any documentation on this? Thank you.