Calling sqlplus from trigger

hi -
I am trying to call a sql script in a trigger. I am trying to pass a parameter to the script but when the sql runs - it doesn't
recognize the parameter. I am probably making a very simple mistake - but I am new
to Forms development.
Here is my code:
DECLARE
CURSOR sheet_docs_cur IS
SELECT doc_num
FROM SNAP_DOCS
ORDER BY DOC_NUM;
BEGIN
FOR snap_rec IN sheet_docs_cur LOOP
HOST('sqlplus user/password@db
@R:\TEST.sql '| |snap_rec.doc_num);
END LOOP;
END;
What have I done wrong ? Thanks....
null

Hi, everyone.
Yes, you can pass parameters to SQL*Plus script file, but only if the parameters are called &1, &2, etc...
So, if you test.sql is:
set verify off
select * from table where doc = &1;Then you can call it using:
HOST('sqlplus user/password@db @R:\TEST.sql '| |snap_rec.doc_num);and &1 will be replaced by snap_rec.doc_num.
There are also a few posts on this subject right here, on this forum. All you have to do is search a little.
Hope this helps,
Pedro

Similar Messages

  • Calling sqlplus from shell script

    Hi ,
    I am calling sqlplus from a shell script. After running sql commands successfully, it fails to continue executing commands from the shell script.
    There is no EXIT statement at the end of the sql.
    The error i get is,
    SP2-0734: unknown command beginning "echo "FFFF..." - rest of line ignored.
    Can someone please help.

    how does your shell script looks like? did you check my other post today on this forum
    sqlplus called from a shell script

  • How to get an error code from from calling sqlplus from shell script?

    Hello -
    i am calling sqlplus from a bash shell script. If the sql statement generates an error, how can I return that error code (unsuccessful) back to the bash shell?
    Thanks!

    user11340104 wrote:
    Hello -
    i am calling sqlplus from a bash shell script. If the sql statement generates an error, how can I return that error code (unsuccessful) back to the bash shell?
    Well, let google be your friend,
    http://www.google.co.in/search?rlz=1C1GGLS_enIN327IN327&sourceid=chrome&ie=UTF-8&q=sqlplus+error+codes
    There are many threads I guess talking about the same issue.
    HTH
    Aman....

  • Calling sqlplus from unix script

    hello,
    I am trying to connect to sqlplus from shell:
    #!/bin/bash
    SERVER_NAME=ORA1
    sqlplus -s SYS/PASSWD@$SERVER_NAME AS SYSDBA <<EOF
    select * from v\$version
    EOF
    However, the output is:
    Usage: SQLPLUS [ [<option>] [<logon>] [<start>] ]
    where <option> ::= -H | -V | [ [-L] [-M <o>] [-R <n>] [-S] ]
    <logon> ::= <username>[<password>][@<connect_string>] | / | /NOLOG
    <start> ::= @<URI>|<filename>[.<ext>] [<parameter> ...]
    "-H" displays the SQL*Plus version banner and usage syntax
    "-V" displays the SQL*Plus version banner
    "-L" attempts log on just once
    "-M <o>" uses HTML markup options <o>
    "-R <n>" uses restricted mode <n>
    "-S" uses silent mode
    Do you have any idea about that?
    Thanks.

    the connection was establised. thanks.
    any idea why I am getting the same output twice for the following statement?
    #!/bin/bash
    ORACLE_SID=ORA1
    export ORACLE_SID
    sqlplus -s SYS/PASSWD@$ORACLE_SID AS SYSDBA <<EOF
    select SUM(bytes) from dba_data_files where tablespace_name = 'tts1';
    EOF
    the output is
    SUM(BYTES)
    3.4773E+10
    SUM(BYTES)
    3.4773E+10

  • How to Call Procedure from Trigger body?

    I have a procedure that works which I tested from sqlplus with 'exec proc_name;'
    what I want is to call this procedure from the trigger and pass the parameters to the proc. the trigger fires AFTER INSERT of certain table and I want to pass those just added attribute values to the proc.
    please help.
    I have tried to do 'exec proc_name' from the trigger but it does not work?

    You don't use exec within pl/sql, just proc_name followed by your parmateters. From within a trigger, the just added values will be :new.column_name. So, you would have something like:
    CREATE OR REPLACE TRIGGER your_trigger_name
      AFTER INSERT ON your_table_name
      FOR EACH ROW
    BEGIN
      proc_name (:NEW.column_name1, :NEW.column_name2);
    END your_trigger_name;
    /You will need to have corresponding input parameters in your proc_name procedure, something like:
    CREATE OR REPLACE PROCEDURE proc_name
      (p_column_name1 your_table_name.column_name1%TYPE,
       p_column_name2 your_table_name.column_name2%TYPE)
    AS
    BEGIN
      -- whatever processing you want to do
    END proc_name;

  • Calling sqlplus from unix shell script

    Hi All,
    I am executing the following code :-
    sqlplus -s ${DATABASE_USER} |&
    print -p -- 'set feed off pause off pages 0 head off veri off line 500'
    print -p -- 'set term off time off serveroutput on size 1000000'
    print -p -- "set sqlprompt ''"
    print -p -- "SELECT run_command from tmp_run_batch where upper(batch_name) = upper('${PAR_PROGRAM_NAME}');"
    read -p RUN_COMMAND
    eval print -p -- \""execute dbms_output.put_line(${RUN_COMMAND});"\"
    read -p RET_VAL
    print -p -- "exit;"
    The select stmt given above gives sample output as :-
    pack_claims_clas_utils.func_main('$PAR_RUN_DATE','$PAR_RUN_LEVEL','$PAR_EXCLUSIVE_RUN_YN')
    And then this package is executed.
    The problem that I am facing is how to handle the no_data_found case of the select stmt. . When this case arises then the stmt. "read -p RUN_COMMAND" hangs.
    Could you please provide any solution ?
    Thanks
    Suds

    Hi,
    Have you tried this:
    # if [ -n means String has non-zero length
    if [ -n $RUN_COMMAND ]
    read -p RUN_COMMAND
    fi
    Hi All,
    I am executing the following code :-
    sqlplus -s ${DATABASE_USER} |&
    print -p -- 'set feed off pause off pages 0 head off veri off line 500'
    print -p -- 'set term off time off serveroutput on size 1000000'
    print -p -- "set sqlprompt ''"
    print -p -- "SELECT run_command from tmp_run_batch where upper(batch_name) = upper('${PAR_PROGRAM_NAME}');"
    read -p RUN_COMMAND
    eval print -p -- \""execute dbms_output.put_line(${RUN_COMMAND});"\"
    read -p RET_VAL
    print -p -- "exit;"
    The select stmt given above gives sample output as :-
    pack_claims_clas_utils.func_main('$PAR_RUN_DATE','$PAR_RUN_LEVEL','$PAR_EXCLUSIVE_RUN_YN')
    And then this package is executed.
    The problem that I am facing is how to handle the no_data_found case of the select stmt. . When this case arises then the stmt. "read -p RUN_COMMAND" hangs.
    Could you please provide any solution ?
    Thanks
    Suds

  • Java function call from Trigger in Oracle

    Moderator edit:
    This post was branched from an eleven-year-old long dead thread
    Java function call from Trigger in Oracle
    @ user 861498,
    For the future, if a forum discussion is more than (let's say) a month old, NEVER resurrect it to append your new issue. Always start a new thread. Feel free to include a link to that old discussion if you think it might be relevant.
    Also, ALWAYS use code tags as is described in the forum FAQ that is linked at the upper corner of e\very page. Your formulae will be so very much more readable.
    {end of edit, what follows is their posting}
    I am attempting to do a similar function, however everything is loaded, written, compiled and resolved correct, however, nothing is happening. No errors or anything. Would I have a permission issue or something?
    My code is the following, (the last four lines of java code is meant to do activate a particular badge which will later be dynamic)
    Trigger:
    CREATE OR REPLACE PROCEDURE java_contact_t4 (member_id_in NUMBER)
    IS LANGUAGE JAVA
    NAME 'ThrowAnError.contactTrigger(java.lang.Integer)';
    Java:
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "ThrowAnError" AS
    // Required class libraries.
    import java.sql.*;
    import oracle.jdbc.driver.*;
    import com.ekahau.common.sdk.*;
    import com.ekahau.engine.sdk.*;
    // Define class.
    public class ThrowAnError {
    // Connect and verify new insert would be a duplicate.
    public static void contactTrigger(Integer memberID) throws Exception {
    String badgeId;
    // Create a Java 5 and Oracle 11g connection.
    Connection conn = DriverManager.getConnection("jdbc:default:connection:");
    // Create a prepared statement that accepts binding a number.
    PreparedStatement ps = conn.prepareStatement("SELECT \"Note\" " +
    "FROM Users " +
    "WHERE \"User\" = ? ");
    // Bind the local variable to the statement placeholder.
    ps.setInt(1, memberID);
    // Execute query and check if there is a second value.
    ResultSet rs = ps.executeQuery();
    while (rs.next()) {
    badgeId = rs.getString("Note");
    // Clean up resources.
    rs.close();
    ps.close();
    conn.close();
    // davids badge is 105463705637
    EConnection mEngineConnection = new econnection("10.25.10.5",8550);
    mEngineConnection.setUserCredentials("choff", "badge00");
    mEngineConnection.call("/epe/cfg/tagcommandadd?tagid=105463705637&cmd=mmt%203");
    mEngineConnection.call("/epe/msg/tagsendmsg?tagid=105463705637&messagetype=instant&message=Hello%20World%20from%20Axium-Oracle");
    Edited by: rukbat on May 31, 2011 1:12 PM

    To followup on the posting:
    Okay, being a oracle noob, I didn't know I needed to tell anything to get the java error messages out to the console
    Having figured that out on my own, I minified my code to just run the one line of code:
    // Required class libraries.
      import java.sql.*;
      import oracle.jdbc.driver.*;
      import com.ekahau.common.sdk.*;
      import com.ekahau.engine.sdk.*;
      // Define class.
      public class ThrowAnError {
         public static void testEkahau(Integer memberID) throws Exception {
         try {
              EConnection mEngineConnection = new EConnection("10.25.10.5",8550);
         } catch (Throwable e) {
              System.out.println("got an error");
              e.printStackTrace();
    }So, after the following:
    SQL> {as sysdba on another command prompt} exec dbms_java.grant_permission('AXIUM',"SYS:java.util.PropertyPermission','javax.security.auth.usersubjectCredsOnly','write');
    and the following as the user
    SQL> set serveroutput on
    SQL> exec dbms_java.set_output(10000);
    I run the procedure and receive the following message.
    SQL> call java_contact_t4(801);
    got an error
    java.lang.NoClassDefFoundError
         at ThrowAnError.testEkahau(ThrowAnError:13)
    Call completed.
    NoClassDefFoundError tells me that it can't find the jar file to run my call to EConnection.
    Now, I've notice when I loaded the sdk jar file, it skipped some classes it contained:
    c:\Users\me\Documents>loadjava -r -f -v -r "axium/-----@axaxiumtrain" ekahau-engine-sdk.jar
    arguments: '-u' 'axium/***@axaxiumtrain' '-r' '-f' '-v' 'ekahau-engine-sdk.jar'
    creating : resource META-INF/MANIFEST.MF
    loading : resource META-INF/MANIFEST.MF
    creating : class com/ekahau/common/sdk/EConnection
    loading : class com/ekahau/common/sdk/EConnection
    creating : class com/ekahau/common/sdk/EErrorCodes
    loading : class com/ekahau/common/sdk/EErrorCodes
    skipping : resource META-INF/MANIFEST.MF
    resolving: class com/ekahau/common/sdk/EConnection
    skipping : class com/ekahau/common/sdk/EErrorCodes
    skipping : class com/ekahau/common/sdk/EException
    skipping : class com/ekahau/common/sdk/EMsg$EMSGIterator
    skipping : class com/ekahau/common/sdk/EMsg
    skipping : class com/ekahau/common/sdk/EMsgEncoder
    skipping : class com/ekahau/common/sdk/EMsgKeyValueParser
    skipping : class com/ekahau/common/sdk/EMsgProperty
    resolving: class com/ekahau/engine/sdk/impl/LocationImpl
    skipping : class com/ekahau/engine/sdk/status/IStatusListener
    skipping : class com/ekahau/engine/sdk/status/StatusChangeEntry
    Classes Loaded: 114
    Resources Loaded: 1
    Sources Loaded: 0
    Published Interfaces: 0
    Classes generated: 0
    Classes skipped: 0
    Synonyms Created: 0
    Errors: 0
    .... with no explanation.
    Can anyone tell me why it would skip resolving a class? Especially after I use the -r flag to have loadjava resolve it upon loading.
    How do i get it to resolve the entire jar file?
    Edited by: themadprogrammer on Aug 5, 2011 7:15 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:21 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:22 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:23 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:26 AM

  • Calling API mtl_online_transaction_pub.process_online from Trigger

    Hello Gurus,
    I'm inserting rows into mtl_transaction_interface table and calling mtl_online_transaction_pub.process_online to process it from a TRIGGER on mtl_material_transactions table.
    But it doesn't process the data and errors with process_flag 3.
    If I comment the call to mtl_online_transaction_pub.process_online and just insert into interface table and then call mtl_online_transaction_pub.process_online from independent PLSQL block it works fine.
    Can someone suggest a solution for the problem, I think the issue is in the design.
    Thanks
    Manu

    Hi,
    I hope you are using an 'after insert' trigger on mtl_transactions_interface.
    Ensure that the MTI record is populated with transaction_header_id with transaction_mode = 1 (Online), process_flag = 1 and lock_flag = 2.
    Call the txn processor with transaction_header_id, and it should work.
    If transaction_mode is 2 (immediate) or 3 (Background) then the MTI record must be commited in database; calling txn processor from trigger cannot see the record as it is not committed.
    If it doesn't work, then you will have to retrieve errors from the return message to understand the problem in detail.
    I would strongly recommend not to use trigger for such processing.
    I believe, you have a custom package/procedure from which you are inserting data into MTI.
    once the insert is done, then you can call the same API from custom code.
    Also check how exactly is MTI is getting inserted, is apps context set correctly (either by means of concurrent program, or by explicitly calling fnd_global.apps_initialize(..) )
    If it still doesnt work, enable Inventory Debug by setting up profiles INV%DEBUG%, and see the log messages. (e.g. set the log file as /usr/tmp/mti.log )
    Hope it helps,

  • Call java from sybase trigger

    Is it possible to call java from Sybase trigger ? If so can you please supply example or URL to one ? Alternative solution is to call shell script from sybase trigger (as app is based on Solaris).
    Regards
    Michal

    Thank for your opinion, but what idea is better ?Doing things in the middle tier, where Java lives.
    Ever heard of event-based trading systems?
    pooling a table every 30 sec. ?. I need to implment
    real-time system which process each trade from table
    once it appears there.Sounds like you have it backwards - you're trying to drive Java from the database.
    I think it'd be better to write that event-based system in Java and leave the database just for persistence.
    GigaSpaces and their ilk are being used this way for highly transactional trading systems. Maybe you could see how they're doing it.
    %

  • As I run or called the editor sqlplus from a button?

    Como llamar la ejecucion del editor de sqlplus desde un boton? Que el boton ejecute esto: c:\oracle\app\products\10.2.0\server\BIN\sqlplus.exe
    Message was edited by:
    user647378
    Message was edited by:
    user647378
    Message was edited by:
    user647378

    I used google translate to clarify the question (I hope at least) for the dummies like me (:, who don't speak any Spanish, and this is the result.
    Subject: As editor sqlplus run from a button?
    Message:
    Calling the execution of the editor sqlplus from a button? The button run this: c: \ oracle \ app \ products \ 10.2.0 \ server \ BIN \ sqlplus.exe

  • Calling report from form. Need PDF output

    I am calling a report from a form using RUN_PRODUCT. I need to display the form in PDF format. When the user clicks the button in the form to run the report, acrobat reader should open up and the report displayed there. Please help.
    Thanks

    Thanks for the response. The first part worked. I am able to get the output in PDF format. In the 2nd part where I want to open acrobat and display the output, I am having some trouble with the code. When I compile, it says
    win_api_environment.read_registry must be declared. Is there some package I need to attach?
    Also, in the After reports trigger, how do I pass vFile (I am assuming this is the PDF file name)?
    Thanks
    The first thing you'll want to do is pass parameters to the report IE DESTYPE, DESNAME and DESFORMAT where these could be FILE, 'c:\temp\report' and PDF.
    Then, you can try this piece of code I wrote (with some help from other people at Metalink and here) sometime back. Now, I call it from forms, but in your case, you'd have to run it in the after report trigger. Since with RUN_PRODUCT you don't know when the report is finished, if you did it from the form, it wouldn't work correctly.
    PROCEDURE OPEN_PDF(vFile IN VARCHAR2)
    IS
    vcServerApp varchar2(40);
    vcServerTag varchar2(600);
    vcCommand varchar2(2000);
    iArgPos pls_integer;
    dummy NUMBER;
    BEGIN
    -- 1 get the Server App for .PDF files
    vcServerApp := win_api_environment.read_registry('HKEY_LOCAL_MACHINE\SOFTWARE\CLASSES\.PDF','',true);
    -- 2 get the executable
    vcServerTag := 'HKEY_LOCAL_MACHINE\SOFTWARE\CLASSES\'||
    vcServerApp||'\SHELL\OPEN\COMMAND';
    vcCommand:= win_api_environment.read_registry(vcServerTag,'',true);
    -- 3 Sort out how to specify the Filename
    iArgPos:= instr(vcCommand,'%1');
    if iArgPos = 0 then --no substitution Var on the command line
    vcCommand := vcCommand||' '||vFile;
    else
    vcCommand := substr(vcCommand,1,(iArgPos-1))||
    vFile||substr(vcCommand,(iArgPos+2));
    end if;
    -- 4 Run using Winexec (or Host if preferred).
    win_api_shell.winexec(vcCommand);
    EXCEPTION
    when no_data_found then
    abortt('Acrobat Reader was not found! Please consult with your help desk to install it and try again.','N');
    END;
    Chad
    I am calling a report from a form using RUN_PRODUCT. I need to display the form in PDF format. When the user clicks the button in the form to run the report, acrobat reader should open up and the report displayed there. Please help.
    Thanks

  • Define variable in package access from trigger

    i want to accessing a variable that is defined in the package from trigger..how i must define this variable in the package ?

    To add one more point to Justin,
    Package variables are global variables. If you want to make it local to single call use PRAGMA SERIALLY_REUSABLE.
    create or replace package pkg_variable
    as
          g_var number := 1;
    end;
    create or replace package pkg_variable_local
    IS
    PRAGMA SERIALLY_REUSABLE;
          g_var number := 1;
    end;
    / Testing Above Two pakcages
    set serveroutput on
    begin
      dbms_output.put_line ( 'Test 1 :');
      dbms_output.put_line ( 'Global Var: ' || pkg_variable.g_var); 
      dbms_output.put_line ( 'Local  Var: ' || pkg_variable_local.g_var);
    end; 
    Result:
    Test 1:
    Global Var : 1
    Local Var : 1
    begin
      pkg_variable_local.g_var := 10;
      dbms_output.put_line ( 'Test 2 :');
      dbms_output.put_line ( 'Global Var: ' || pkg_variable.g_var); 
      dbms_output.put_line ( 'Local  Var: ' || pkg_variable_local.g_var);
    end; 
    Result:
    Test 2:
    Global Var : 10
    Local Var : 10
    begin
      dbms_output.put_line ( 'Test 3 :');
      dbms_output.put_line ( 'Global Var: ' || pkg_variable.g_var); 
      dbms_output.put_line ( 'Local  Var: ' || pkg_variable_local.g_var);
    end; 
    Result:
    Test 3:
    Global Var : 10
    Local Var : 1
    But remember, Serially reusable packages cannot be accessed from database triggers.

  • Error calling BLS from oracle database

    Hi Experts,
    We have a scenario in which we are calling BLS from oracle database using trigger. The call is made using the following URL:
    http://<Host name>:50000/XMII/Runner?Transaction=<TRX_Path>&Material=MATNR&Pallet_id=PALLET&Plant=PLANT&Proc_order=PROC&Prodline=PROD&Quantity=QTY&Start_Date=DAT&Start_Time=TIM&Status=STAT&UOM=UOM1&User_name=USER&OutputParameter=*
    This used to work fine in 11.5 but when we upgraded to 14.0 it is not working. We have maintained server details in \etc\host file.
    We were getting error in file 'Error 1 Text.txt'. "A possible Cross-Frame Scripting attack has been prevented. Please contact your system administrator or refer to" this was the last error message. We checked this on SCN and based on the search results we have implemented SAP note 1651004 wherein setting in netweaver is required to be changed. After note was implemented we are getting another error text ('Error 2 Text.txt') "This will happen if the browser running the page tha". We tried a few ways but could not capture the full message coming.
    Has anybody of faced similar problem? I would highly appreciate any hint which could help in solving this problem.
    System Information:
    NW 7.31 SP 10
    Oracle 11.2.0.4
    MII 14.0 SP5 patch 7
    Regards,
    Darshan

    Hi Christian/Anushree,
    I have now modified the URL by adding Illum login name and password:
    http://<Host name>:50000/XMII/Runner?Transaction=<TRX_Path>&Material=MATNR&Pallet_id=PALLET&Plant=PLANT&Proc_order=PROC&…
    When i run the url in browser it gives me the expected results but when i try to trigger it from Oracle i am still getting the error as below:
    "<script>
      var inPortalScript = false
      var webpath = "/logon_ui_resources/"
    </script>
    <html>
    <head>
    <BASE target="_self">
    <link rel=stylesheet href="/logon_ui_resources/css/ur/ur_ie5.css">
    <title>User Management, SAP AG</title>
    <script language="javascript">
    var originWindowName=window.name;
    window.name="logonAppPage";
    function restoreWindow() {
    try{
    window.name=originWindowName;
    } catch(ex){}
    </script>
    <script language="JavaScript">
    function putFocus(formInst, elementInst) {
      if (document.forms.length > 0) {
        document.forms[formInst].elements[elementInst].focus();
    function setValuesAutoCreation() {
    var form = document.getElementById('logonForm');
    form.j_username.value="";
    form.j_password.value="";
    form.automaticAccountCreation.value="true";
    function submitForm() {
    var form = document.getElementById('logonForm');
    form.submit();
    function clearEntries() {
      document.logonForm.longUid.value="";
      document.logonForm.password.value="";
    function setFocusToFirstField() {
    myform = document.logonForm;
    try{
       for (i=0; i<myform.length; i++) {
        elem = myform.elements[i];
        if (!elem.disabled) {
          elemType = elem.type;
          if (elemType=="text" || elemType=="password") {
           if (!elem.readOnly) {
              elem.focus();
              break;
          if (elemType=="select-one" || elemType=="select-multiple" || elemType=="checkbox" || elemType=="radio") {
            elem.focus();
            break;
    } catch(ex){
    function addTenantPrefix() {
      return true;
    </script>
    </head>
    <body class="urBdyStd" bgcolor="#F7F9FB" onLoad="setFocusToFirstField()" onUnload="restoreWindow()">
    Thanks,
    Darshan
    <script language="JavaScript">
    var blockPage = false;
    </script>
    <script language="JavaScript">
    try {
      if (top.document.domain != self.document.domain) {
      blockPage = true;
    } catch (error) {
      // This will happen if the browser running the page tha"

  • Calling Servlet from a java prog?

    Hi all,
    I am calling servlet from a java prog (Java Agent in Lotus Notes) by using URL and URLConnection object. how can i trigger the Servlet By using doPost method .I have to send some parameter also.
    Thanx
    Muthu

    you need to open a connection to the servlet. Then you must call getInputStream() and getOutputStream() and use them in any way you see fit. I was trying this before and could not get POST to work unless I openned the input stream from the servlet. Strange... but doGet worked without openning the input stream???
    // open a connection....
    // write to the servlet
    servletConnection.getOutputStream().write("whatever");
    servletConnection.getOutputStream().flush();
    servletConnection.getOutputStream().close();
    // grab what the servlet sends back, required to do a post.
    byte [] in = new byte[100];
    servletConnection.getInputStream().read(in);
    servletConnection.getInputStream().close();

  • Call event from other event or other vi

    I have LabVIEW 6.1.
    1. Can I call an event or a serious of events from another event? How can I do that? It doesn't matter if the events are executed after the event that called them is completed.
    2. Can I call an event from another vi? Let's say I have an event structure in a subvi. Can I trigger an event in the subvi calling it from the main vi? How would I do that?
    Thanks for your help.
    Jerome.

    Salutations,
    In reality, a program should only have 1 event structure. Or so someone much more knowledgable with labview has told me in the past.
    It's an important note to make that when running events or SubVi's, they will run until they are accomplished and then allow the next event or subvi to take place. So if you have multiple event structures, you must wait until one finished before the next one is run (This might...no guarantees, be avoided by multiple while loops and not locking the front panel on the execution of an event). Now, since you don't care, you can handle such a case. Just make multiple events in your one main event structure. I'm not sure what exactly you want to do, just make sure you "unfreeze" the front panel when you're messing with what handles what events.
    Hence, you could have a "run" button that's pressed and it goes about it's business. Then you could have a mouse down response, that you hit while your "run" process is still going, this will be, in a sense, logged and accomplished once the "run" task is done. Now, if you're looking for data to trigger another event, maybe I'd switch over to a case structure that's inside your event structure. For case structures, every case must have an output.
    Can you trigger an event in the subvi calling it from the main vi.... Excellent question... I'm not exactly sure when this would come up, but i'm not super experienced like some of the people around here. It may be possible, but i'd imagine a case structure would be more efficient. Like the ones in error handling. Pass the case to the subvi, it'll operate depending on what you want, and then continue along. Events seem most useful when dealing with events that occur on the front panel.
    Hope this helps,
    ElSmitho

Maybe you are looking for

  • Embedding FULLY SCALABLE SWF in PDF

    Hello...good people... I would like to embed a FULLY SCALABLE Photoshop Zoomable photo (swf) and Adobe Bridge web gallery (swf) inside my pdf. After watching the AcrobatUserCommunity Tech Talk tutorial "Embedding Flash in PDF" - September 2009 (https

  • Mac Pro included RAID Card?

    Does the latest Mac Pro included hardware RAID card or software RAID if multi drive installed? Or it doesn't have RAID function? Thank you

  • Account Key & Accruals in Pricing Procedure

    Hi, When i Maintianed both account key and accruals in my pricing procedure, system is taking the transaction key mentioned for accruals. And when i maintained without account key also system is picking the transaction key from accruals. When i maint

  • Error when installing office 2013

    Hello, when installing office 2013 on a machine i receive this error. A repair of the registry didn`t fix the issue. Anybody with an option? Thx

  • Seeing constant time inserts - that should be impossible, right?

    Hi all, My problem may not actually be a problem. I believe berkeley db je uses btrees for indexing. I am making MANY MANY inserts and no matter how big the index and database grow, my insert times are still constant. Theoretically, this is impossibl