Form Code Execution

Hi,
Is it possible that we can execute the Oracle Form code on the fly, like PL/SQL Code using the Execute Immediate.
Scenario
Declare
lv_block_name Varchar2(100);
lv_item_name Varchar2(100)
Begin
lv_block_name := :System.current_block;
IF lv_block_name = 'XYZ' Then
lv_item_name := :system.current_item;
end;
I have store this sample code in the database, and I goona pass this code to the Oracle Form library and want it execute in the Library..... Any solution or idea...
Thanks,
Edited by: Mohsin on Feb 22, 2011 1:18 PM

There is no such thing like "Dynamic Forms PL/SQL" or whatever you want to call it. Dynamic SQL is executed on the Database Server, and thus the Forms Builtins cannot be executed as the Database doesn't understand them.
However; even if you just want to store Database PL/SQL in Tables I wouldn't dare to go down that road.
First of all it's a nightmare to maintain as a recompile of your forms won't fail when you change your objects which would brake your code but as it's all dynamic nobody can tell. Also have fun debugging your dynamic routines when you search for bugs (yes, you will have bugs, no one writes error free code). Second is that it's a unnecessary overhead (retrieve the logic from the database, parse it and execute it again) leaving alone that you most certainly will trash the Shared Pool of the database. Your solution will seriously suffer from performance and will never scale, that's for sure. And of course you will have a serious security issue. The day someone get's access to your table where your code is stored is the day your database will start to behave abnormal and you most certainly will loose data.
So don't think about implementing such a silly approach no matter how cool you think it is: it's not. It's a nightmare and a risk from every single point of view.
Storing PL/SQL in the database is already invented: it's called stored procedures. Storing somewhat generic Forms PL/SQL is also already invented: it's called Library. Don't try to reinvent things which already exist as your solution most certainly won't work as good as the one already provided by oracle.
cheers

Similar Messages

  • Mail to Form Code Confussion

    Hello everyone. I am having an issue with my Mail to Form code. It's not so much a technical one (I don't think it is anyway) It's mostly I don't understand what information to plug into a couple parts. I will post the code here (leaving out everything before the "body") and hopfully some one can help me out.
    <body>
    <div class="style1" id="apDiv1">Call Request Form</div>
    <div id="apDiv2">
      <div align="center">Please fill out this form and a Beta Test Studios represenetive will contact you as soon as possible. Thank you.</div>
    </div>
    <div id="apDiv3">
      <div align="center"><strong>Please tell us wher you heard about Beta Test Studios</strong></div>
    </div>
    <FORM METHOD=POST ACTION="[email protected]" ENCTYPE="text/plain">
    <table width="311" height="480" border=0 cellpadding=20 cellspacing=0>
    <tr>
    <td height="327"><font size=2 face="arial" color="#000000">
    <input type="text" name=Name size=27 />
    :Name<BR>
    <INPUT type="text" name=Phone size=27 id="Phone">
    :Phone<BR>
    <INPUT type="text" name=Call time size=27 id="Call time">
    :Time to Call<BR>
    <INPUT type="text" name=email size=27> :E-mail
    </font></td>
    </tr>
    <tr>
    <td width="230" height="62">
    <SELECT name="choices" size=1>
    <OPTION selected> Please Choose
    <OPTION> Google
    <OPTION> Yahoo!
    <OPTION> Newspaper/Magazine
    <OPTION> Word of mouth
    <OPTION> Other
    </SELECT></td>
    </tr>
    <tr>
    <td height="91">
    <font size=1 face="arial" color="#000000">
    <center>
    <INPUT NAME="redirect" TYPE="hidden" VALUE="index.html">
    <INPUT NAME="NEXT_URL" TYPE="hidden" VALUE="index.html">
    <INPUT type=submit value="Send">
    <INPUT type=reset value="Clear">
    </center></td></tr></table>
    </FORM>
    <!-- ** END OF FORM ** -->
    </body>
    </html>
    I am having a problem understanding exactly what I am supposed to put here near the very bottom after <INPUT NAME="redirect" TYPE="hidden" VALUE=    and after <INPUT NAME="NEXT_URL" TYPE="hidden" VALUE=    I know that I am supposed to replace the "index.html" part in both lines I am not sure what I am supposed to replace it with. Any help would be appreciated. Thanks so much.

    Hi,
    What are you trying to do exactly?  If you would like to make a piece of text link to a mailto code where, if clicked, it will automatically open up that person's email with a blank email page with u as the receiver, then all you have to do in Dreamweaver is..
    1.  Highlight all the text you want the link to the email to be.
    2. Go to the "link" window in the properties panel under the main viewing window
    3. Type in "mailto:youremailhere" without the quotes of course and that will create the link I believe you might be looking for.
    If this is not the nature of your problem please be more descriptive.

  • Code Execution in Cover Flow View and .mov Files

    There is a code inside QuickTime movies that gets executed in Cover Flow view in Leopard!!!!!!!!.
    I was helping a friend installing Leopard on his machine, and after restarting, I was showing him the new options in the Finder, when a found a bunch of videos (searched on his computer with Spotlight) and switched to 'Cover Flow View', and then Safari started opening web pages from the internet (Mostly adult sites).
    After doing some tests I've noticed that the pages load the moment the Finder 'refines' the view of the videos. You know when the Finder first generates a blocky image of the video (some times called proxy image) and then generates a higher or cleaner resolution of that same video.
    Not only that, if I resize the window or the preview pane, the code executed again and Safari opened the pages again!!!!
    The Finder also executed the code in icon view with the 'Show Icon Preview' option selected in 'View Options' (Command-J).
    Opening the videos in QuickTime Player did not trigger the code. But I've noticed that the videos start playing the moment they open. The Inspector (Command-I) didn't show anything unusual. But the Properties window (Command-J in QuickTime Pro) show a "Sprite Track" of Format 'Sprite' but again the different tabs (Annotations, Resources, Visual Settings or Other Settings) didn't show anything unusual.
    *CORRECTION: The code also gets executed at the middle of the video when played in QuickTime. So this problem is related to QuickTime.!!!!!!*
    The only solution to stop the code execution is to delete the 'Sprite Track'!!!!.
    I also opened the movies in TextEdit and found the following text almost at the end of all the weird symbols:
    (I'm sorry but the code disappears when I publish this post).
    That's one of the pages that Safari was opening.
    I don't know where my friend downloaded those videos, but the potential security risk is imminent.
    I had the same results even after updating to QuickTime 7.3
    I can upload the videos somewhere (at least the 'clean' ones) so you can make you own tests.
    Any thoughts or comments?????
    Is this a known issue in QuickTime?????
    P.S. Once again please excuse my English (my main language is Spanish).

    If I'm understanding correctly the "Sprite" is a part of how QuickTime works. In older versions you USED to be able to attach JavaScript to a sprite and do all kinds of useful and fun things. However, some websites used JavaScript to alter themselves, so a well crafted QuickTime movie could be used to deploy code that would alter websites. As a result, a LOT of this functionality was curtailed in later versions and many cool QuickTime functions no longer work.
    The few that DO still work are when they are basic hyperlinks that take you to another web page, (Like at the end of this movie, BUT you have to click the link to go
    http://www.makentosh.com/tipsfromtheiceberg/Blog/Entries/2006/3/7Somebody_ToldMe....html
    ) and others no longer work within the browser (they only work when using the QuickTime player). Give this a try. Use Safari to "Open File..." and open the .mov file. After it's open, see if it generates any other windows from there. If it doesn't, then I'd THINK it's operating as intended BUT it wouldn't hurt to send your feedback here for Apple to look into and/or fix it if necessary.
    http://www.apple.com/quicktime/feedback/
    Message was edited by: Kyn Drake

  • Adobe form code initialization with HCM Processes and Forms?

    Hi,
    We're trying to dynamically determine some language-dependent text label values in the form interface code initialization routine before displaying an interactive PDF form. All works fine when using the transaction SFP test tool, label values are dynamically determined using the code on the PDF printout.
    However in our case, the interactive form is embedded in a HCM P&F scenario and when launching the process form WDA application from the UWL, it looks like the same code initialization code is executed (when debugging it) but the values are not updated on the PDF when displaying.
    Any ideas how to go forward? Should we instead be using an ISR BAdI or such to do the same thing? We do not want to store all the label fields in the HCM P&F form scenario, because they are not supposed to be stored in HCM, we just need to dynamically display some text labels on the PDF form.
    We're on SAP ERP 6.0 EhP4, NW 7.01.
    Best regards,
    Mikko

    Hi Chris,
    thanks for your answer. Just to give you some background on the requirement, we are dealing with the public sector and they are let's say quite strict about form appearances
    To elaborate more, we have a need to build a single work contract printout PDF form for all the company codes (embedded into a second form scenario in our HCM P&F hiring process), because 90% of the layout and of all the labels in the work contract are common to all ccodes. Unfortunately for us, there are however some static texts / text labels with their translations whose customer requirements vary between the company codes. In addition, the customer is not ready to harmonize these texts mostly because of legal reasons. An example of this is as follows:
    - ccode 1 label: work contract (+ translations to several languages)
    - ccode 2 label: work contract approved by local union (+ translations to several languages)
    - ccode 3 label: work contract signed and approved by local union and company (+ translations to several languages)
    As silly as the requirement may seem, they are not ready to harmonize these labels into a single label because of these reasons (we have tried this many times without much success and told them about the technical difficulties to come). So we need to come up with a working solution
    What we have gone forward with so far is a Z-table containing all the dynamic texts and their translations. We are now just looking for a way how to dynamically populate PDF form label values upon runtime. In normal PDF print form cases (= without HCM P&F involved), the code initialization routine works just fine. We bind the label values to the form interface elements and then upon runtime we populate the interface elements in the routine based on the incoming company code value.
    But this is where we are stuck now. It seems HCM P&F somehow prevents or overwrites the changes done in the PDF forms code initialization routine when launching the PDF form from UWL and the HCM P&F process form WDA app and I'm looking for ways to make it happen.
    Any ideas?
    Kind regards,
    Mikko

  • Embedding form code into a lightbox

    Hello,
    I am working on a simple test page trying to figure out lightboxes.
    I have it almost functional based on examples I found online, however, I am stuck.
    I can't seem to figure out how to embed my form code into the lightbox successfully.
    Basically, I need to replace the image that pops up with my form.
    My form code is:
    <script charset="utf-8" src="//js.hubspot.com/forms/current.js"></script>
    <script>
      hbspt.forms.create({
        portalId: '206683',
        formId: 'ecaa931c-1fc4-4b96-8aea-b040169f449d'
    </script>
    My test page is located at http://online.saintleo.edu/Lightbox/Lightbox.html.
    As usual, you guys/gals are great and I appreciate all that you do.
    Kind regards,
    JK

    Yes, that it correct.
    Ok, so I switched to FancyBox 2 and am just trying to figure out where/how to embed my form script......
    <script charset="utf-8" src="//js.hubspot.com/forms/current.js"></script>
    <script>
      hbspt.forms.create({
        portalId: '206683',
        formId: 'ecaa931c-1fc4-4b96-8aea-b040169f449d'
    </script>
    My new basic sample FancyBox page is here:
    http://online.saintleo.edu/FancyBox2/FancyBox2.html
    Thanks again for the help, your guidance is greatly appreciated.
    Kind regards,
    JK

  • Embedding form code into website

    I've tried several times by copying the form code and pasting it into the html coding area of the website and when I go over to the visual side it shows nothing...

    Yes, that it correct.
    Ok, so I switched to FancyBox 2 and am just trying to figure out where/how to embed my form script......
    <script charset="utf-8" src="//js.hubspot.com/forms/current.js"></script>
    <script>
      hbspt.forms.create({
        portalId: '206683',
        formId: 'ecaa931c-1fc4-4b96-8aea-b040169f449d'
    </script>
    My new basic sample FancyBox page is here:
    http://online.saintleo.edu/FancyBox2/FancyBox2.html
    Thanks again for the help, your guidance is greatly appreciated.
    Kind regards,
    JK

  • Web Part Error: Sandboxed code execution request failed - office 365

    If i am trying to edit the webpart, i am getting this error "Web Part Error: Sandboxed code execution request failed"
    But the same code worked properly before two months, i didnt done any deployment activities from last 6 months..i dont know how it is possible ? 
    and the same issue happening during the javascript post back also
    1) I cant able to restart the sandbox service because i am using office 365
    2) it worked properly before march month, after the patch upgrade which is released by microsoft, i am facing this kind of issue..
    can any one help to resolve this issue ?

    Hi,
    Please post your question on online community for sharepoint 

  • How to learn form code well?

    i don't know how to learn form code well and where to learn it?
    i also don't know how to learn html code well and where to learn it?
    because of form code ,html code , javascript code and so on are to be used with
    php code and oracle pl/sql code?
    who can tell me some good places to learn these knowledge ?

    Hi,
    You have to learn it by yourself by reading/practicing some good books..
    This is a good place to start on for HTML/Javascript..
    http://www.w3schools.com/

  • UIKit, Metric Logs, Kern_Invalid, Shell Code execution

    I use i Phone version 7.1.2 and I am new to apple. I am curious to know if anyone in the community has noticed "bug_type";"193"os_version":"iPhone OS 7.1.2, It seems as though the system crash report states, Exception Type:EXC_BAD_ACCESS (SIGSEGV), Exception Subtyp: Kern_Invalid_Address at 0x0000000015d592c8 triggered by Thread 0 or bug_type";176, found under General, About,  diagnostic and usage data.
    Or if anyone in the community has also seen awdd-2014-09-11-001040-3.consolidated.metriclog. It seems as if a UIKit is involved similar to cunzhang from Adlab of Venustech, and Ian Beer of Google Project ZOO's findings.
    It seems as though crashes are occurring on the phone using shell code execution and UIKit's I am unaware of a patch or software update. Although I have been privy to the wild card diginotar fake ssl certs, in the past.
    Has anyone else seen or encountered Data subject FlashStatus-2014-09-10-234947.ips.synced bug type 176, Setup_2014-09-10-075848_iPhone.ips bug type 109, concerning airport settings, bud_2014-)9-11-171830_Metric-Log-Inc.ips Path System Library Private Frameworks, crashed triggered byThread 5 0libsqlite3.dylib+139484 0x000000001995a0dc 0x199518000. 
    I have shown this to Apple employees and they stated I may need to contact a programmer.
    I have contacted Apple directly brought this to their attention, they are, as always very supportive. But, I believe I need a programmer as this is above my expertise. Any help from the community would be appreciated. Even a link to where I can find out more would be helpful.

    Yes, thank you. This is the closest solution to my problem.
    However, I will now introduce host_profile host agent.
    But I can not understand where exactly did I lack rights to the agent?
    ======================
    SAPSYSTEMNAME = SAP
    SAPSYSTEM = 99
    service/porttypes = SAPHostControl SAPOscol SAPCCMS
    service/admin_users = daaadm sapadm
    DIR_LIBRARY = /usr/sap/hostctrl/exe
    DIR_EXECUTABLE = /usr/sap/hostctrl/exe
    DIR_PROFILE = /usr/sap/hostctrl/exe
    DIR_GLOBAL = /usr/sap/hostctrl/exe
    DIR_INSTANCE = /usr/sap/hostctrl/exe
    DIR_HOME = /usr/sap/hostctrl/work
    service/logfile_000 = /tmp/s
    service/logfile_001 = /usr/sap/DAA/SMDA97/SMDAgent/log/smdagent_trace*.trc
    service/logfile_002 = /usr/sap/DAA/SMDA97/SMDAgent/log/smdagent_trace.*.trc
    service/logfile_003 = /usr/sap/SLM/DVEBMGS00/j2ee/cluster/dispatcher/log/applications*.log
    service/logfile_004 = /usr/sap/SLM/DVEBMGS00/j2ee/cluster/dispatcher/log/applications.*.log
    service/logfile_005 = /usr/sap/SLM/DVEBMGS00/j2ee/cluster/dispatcher/log/defaultTrace*.trc
    service/logfile_006 = /usr/sap/SLM/DVEBMGS00/j2ee/cluster/dispatcher/log/defaultTrace.*.trc
    service/logfile_007 = /usr/sap/SLM/DVEBMGS00/j2ee/cluster/server0/log/applications*.log
    service/logfile_008 = /usr/sap/SLM/DVEBMGS00/j2ee/cluster/server0/log/applications.*.log
    service/logfile_009 = /usr/sap/SLM/DVEBMGS00/j2ee/cluster/server0/log/applications/com.sap.xi/xi*.log
    service/logfile_010 = /usr/sap/SLM/DVEBMGS00/j2ee/cluster/server0/log/applications/com.sap.xi/xi.*.log
    service/logfile_011 = /usr/sap/SLM/DVEBMGS00/j2ee/cluster/server0/log/defaultTrace*.trc
    service/logfile_012 = /usr/sap/SLM/DVEBMGS00/j2ee/cluster/server0/log/defaultTrace.*.trc
    ======================

  • Halt code execution while awaiting a return value - like JOptionPane..

    I've been struggling with a minor annoying problem...
    I want to achive kindda the same thing as what happens when you call: String s = JOptionPane.showInputDialog(...);
    The code execution locks until a value is returned, and this is exactly what I want to be able to do with my own custom dialog/frame/whatever.
    Obviously, wait() and notify() on the calling thread won't work, so how can I achieve this optionpane gui-code-locking behaviour with my own custom gui components?
    Thx in advance !

    From JInternalFrame source:
         * Creates a new <code>EventDispatchThread</code> to dispatch events
         * from. This method returns when <code>stopModal</code> is invoked.
        synchronized void startModal() {
         /* Since all input will be blocked until this dialog is dismissed,
          * make sure its parent containers are visible first (this component
          * is tested below).  This is necessary for JApplets, because
          * because an applet normally isn't made visible until after its
          * start() method returns -- if this method is called from start(),
          * the applet will appear to hang while an invisible modal frame
          * waits for input.
         if (isVisible() && !isShowing()) {
             Container parent = this.getParent();
             while (parent != null) {
              if (parent.isVisible() == false) {
                  parent.setVisible(true);
              parent = parent.getParent();
            try {
                if (SwingUtilities.isEventDispatchThread()) {
                    EventQueue theQueue = getToolkit().getSystemEventQueue();
                    while (isVisible()) {
                        // This is essentially the body of EventDispatchThread
                        AWTEvent event = theQueue.getNextEvent();
                        Object src = event.getSource();
                        // can't call theQueue.dispatchEvent, so I pasted its body here
                        if (event instanceof ActiveEvent) {
                            ((ActiveEvent) event).dispatch();
                        } else if (src instanceof Component) {
                            ((Component) src).dispatchEvent(event);
                        } else if (src instanceof MenuComponent) {
                            ((MenuComponent) src).dispatchEvent(event);
                        } else {
                            System.err.println("unable to dispatch event: " + event);
                } else
                    while (isVisible())
                        wait();
            } catch(InterruptedException e){}
         * Stops the event dispatching loop created by a previous call to
         * <code>startModal</code>.
        synchronized void stopModal() {
            notifyAll();
        }It basically works like this:
    If this thread is not the EventDispatcher, then just use wait() and notify().
    If it is the EventDispatcher...the process the events from here while we wait for the dialog to close. Seems kind of dirty, but it works.

  • Timing C Code execution

    I am attempting to increase time the c code execution time as
    I improve the performance of my algorithm. I tried using time.h and
    when doing something simple like
    time_t1;
    time(t1);
    The compiler responds with
    called object ‘&time’ is not a function
    What is the best method for timing the c execution time given
    we are not using the Alchemy gcc?

    Yea...I am looking for something on the C side of things. I
    tried using clock() also but I don't feel like the values are
    correct. The timings stay the same every time I run the program
    even with changes to the C code and some other odd results. Any
    thoughts? I could just be doing something wrong...does anyone know
    if this should work???

  • Embed form code not updating subsequent edits

    My initial form design and distribution when well, however the program won't update the embed form code. I don't see a place to refresh the information, or correct this problem.
    thanks for any help with this problem.

    Hi,
    We have a document on trouble shooting Embeded Forms in FormsCentral. Please check it out at http://forums.adobe.com/docs/DOC-1991#comment-11295 to see if your issue is addressed.
    Thanks,
    Wenlan

  • Altering Adobe Muse Form Code

    Hello
    I am using a CRM software called Infusionsoft and it runs my online marketing campaigns. I need to add some code to my forms that will ensure the form that is filled in in on my site that was created in Muse, points to my Infusionsoft campaign.
    If I alter the code in BC, will my next upload of the site from muse overwrite the form code?
    Please let me know if anyone has done this successfully?
    Regards
    Rebecca

    Hi Rebecca,
    Yes, if you will alter the code in BC, then next upload from Muse will over write the existing code. As a work around, create a form in BC. There is "More option" button on the form. Click it and click "Customize form". Add your code to the form, get the HTML code of the form and add it to your muse page. This should help you achieve what you are looking for.
    Cheers!
    Aish

  • Varchar2 "Width" during code execution

    Release 10g2 --
    Is it possible to in some way determine the defined "width" of a char variable (esp. varchar2) during code execution?
    For example, given:
    =================================
    strng VARCHAR2(<width>)
    BEGIN
    strng := function(sizeof(strng))
    =================================
    Is there any reasonably straightforward manner to create that "sizeof" function which can return the max width of strng to the function? I'd like to make sure, without writing exception logic, that I don't overflow the boundary of the strng variable. This is fairly easy to do in c but I don't see anything readily analogous in Oracle. Assume that strng is not tied to a table column, in particular, although that, too (i.e., created using %TYPE in the definition) would probably be useful to be determinable as well.
    Any suggestions as to how one might accomplish this without some absurd "fill until the exception occurs" loop would be appreciated.

    Thanks, I searched for something like that but didn't find it.
    There is a function called VSIZE in Oracle 9i, but it returns the memory length of the ACTUAL string, not the theoretical maximum. The only way I see for you is to select the string length from the data dictionary, look at ALL_TAB_COLUMNS. Or write a loop with an exception section, trying to add one character after another until the exception is raised. This is correct, VSIZE does not do what I'm after. The specific link above deals more with the special case of %TYPE. I'm more interested in the general case of a defined variable -- Where in the Data Dictionary would I look for information about a variable? (I don't necessarily need instructions, but a pointer to something to read that should cover what I'm after would be helpful-- even a book reference would be of use, since it's hard to tell what books cover what topics well -- I don't mind becoming more knowledgeable about the DD, that seems like widely useful info anyway).
    Any suggestions, links, pointers, would be greatly appreciated, thanks.

  • Allowing the movie to run during complex code execution

    Hello,
    I have this complex XML processing code that builds up thousands of objects on stage. This might take some time. Perhaps not that big time to bring up that message about slow code execution, however signifficant enough to cause interface uncomfortabilities.
    I understand very well that I can restructure my code in order to save all contextual variables, all counters in an object that is passed down to onEnterFrame events that process it a little bit and then pass it further, until the job is done.
    However, before I go into dissecting my code, I wanted to make sure if there really is not a way how tom tell flash player do it's frame rendering routine while a complex code is executed in background (without splitting it up).
    Thanks!

    No, unfortunately, Flash player is not able to run something on a seperate thread while code is currently executing (the player will just lock up if the code execution takes longer than a certain amount of time and you'll get the dreaded "A script is causing the player to run slowly" dialog).  People have done work to do something similar to what you are trying to do, but ultimately, it comes down to running an ENTER_FRAME event or timer to break up the code execution.

Maybe you are looking for