How do i fire a query/Stored procedure only once

Hi,
I have a master frame and multiple child frames. Master frame triggers child1 frame which triggers child 2 frame etc using some common keys between the frame.
Now each frame executes a stored procedure and then uses the Db2 cursor as a record set. However when the same frame is fired again then the stored procedure is triggered again. But i could very well use the same record set from the record set that i already have,
In other words i need to fire the stored procedure/query only once and not every time the frame is fired.
I just need to get the record set for each frame and then operate on the retrieved record sets.
Is there a way to do this?
Currently I experience serious performance issues as the stored procedures get fired repeatedly thousands of times
Any help will be greatly appreciated
Thanks
anand

I am still haveing problems so I will try and attach my program and see if you can help a little more that. It will probably be easier for you to look at this way. When you look at the diagram sequence 0 is the one the problem is in. In that sequence you will see a case structure and that is where the finite pulse train vi is. When case 1 is selected the finite pulse train will run again and again until I leave case 1. I need to have the program run the finite pulse train once and then wait and do nothing until the case is changed. The finite pulse train will be in all cases inside the case structure I just haven't done that yet, I am waiting until it works. The pulse train is used to move a stepper motor that is why running only once is im
portant because the stepper motor is used to position something.
Attachments:
AMC_Eagle_Both_Inputs_Working_2.vi ‏266 KB

Similar Messages

  • How to use order by in stored procedure base block?

    How to use order by in stored procedure base block? I need to change order by dynamically

    Use SET_BLOCK_PROPERTY('BLOCK_NAME',ORDER_BY,'COLUMN_NAME1, COLUMN_NAME2');

  • How to write a PL/SQL stored procedure in Oracle to call Webservice

    Can any one pelase send me a code on how to write a PL/SQL stored procedure in Oracle database to call the Webservice ?
    Thanks,
    Rajesh

    Were you able to solve this problem

  • How to call a sql server stored procedure from oracle

    Hi all,
    Please anybody tell me how to call a sql server stored procedure from oracle.
    I've made an hsodbc connection and i can do insert, update, fetch data in sql server from oracle. But calling SP gives error. when I tried an SP at oracle that has line like
    "dbo"."CreateReceipt"@hsa
    where CreateReceipt is the SP of sql server and hsa is the DSN, it gives the error that "dbo"."CreateReceipt" should be declared.
    my database version is 10g
    Please help me how can i call it... I need to pass some parameters too to the SP
    thanking you

    hi,
    thank you for the response.
    when i call the sp using DBMS_HS_PASSTHROUGH, without parameters it works successfully, but with parameters it gives the following error
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Generic Connectivity Using ODBC][Microsoft][ODBC SQL Server Driver]Invalid parameter number[Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index (SQL State: S1093; SQL Code: 0)
    my code is,
    declare
    c INTEGER;
    nr INTEGER;
    begin
    c := DBMS_HS_PASSTHROUGH.OPEN_CURSOR@hsa;
    DBMS_HS_PASSTHROUGH.PARSE@hsa(c, 'Create_Receipt(?,?)');
    DBMS_HS_PASSTHROUGH.BIND_VARIABLE@hsa(c,1,'abc');
    DBMS_HS_PASSTHROUGH.BIND_VARIABLE@hsa(c,2,'xyz');
    nr:=DBMS_HS_PASSTHROUGH.EXECUTE_NON_QUERY@hsa(c);
    DBMS_HS_PASSTHROUGH.CLOSE_CURSOR@hsa(c);
    end;
    Create_Receipt is the sp which requires two parameters.
    please give me a solution
    thanking you
    sreejith

  • How can I make my query to compare only columns of two tables... not the storage information?

    11GR2
    =-----------------------------------
    I am using below querry to compare two table that has same name, under two different users... But after making storage information false like below and  if the storage information is different on column level than it create "Alter modify " statements for the column ... How can I make my query to compare only columns of two tables... not the storage information?
    begin
    DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'PRETTY', TRUE);
    DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'SQLTERMINATOR',TRUE);
    DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'SEGMENT_ATTRIBUTES', FALSE);
    DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'STORAGE', FALSE);
    DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'TABLESPACE',FALSE);
    DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'CONSTRAINTS',FALSE);
    DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'REF_CONSTRAINTS',FALSE);
    DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'CONSTRAINTS_AS_ALTER',FALSE);
    End;
    select REGEXP_REPLACE(dbms_metadata_diff.compare_alter('TABLE','TABLE_NAME_A','TABLE_NAME_A','USER1','USER2'),('USER1...'),'', 1, 0, 'i') from dual

    I am using below querry to compare two table that has same name, under two different users... But after making storage information false like below and  if the storage information is different on column level than it create "Alter modify " statements for the column ... How can I make my query to compare only columns of two tables... not the storage information?
    If you want help you have to SHOW us what you are doing and how you are doing it; you can't just try to tell us in your own words.
    We can't see your computer screen.

  • How to add parameters to a stored procedure in B1 Query generator

    Dear All,
    I made a stored procedure in sql. I'd like to call it from B1. It's working fine when I call like this (I created an empty query in Query generator and paste this) :
    exec stproc  @projectFrom = '',
                       @projectTo = 'PRJ03',
                       @profitCodeFrom = '',
                       @profitCodeTo = 'uj',
    The problem is, Could I call this procedure with parameters like normal queries (select ... where .. = [%0])? Can I pass parameters to it somehow?
    Thanks a lot
    Jani

    Inside B1 :
    DECLARE @return_value int
    Declare @Fromdate datetime
    declare @Todate datetime
    declare @supp nvarchar(15)
    SELECT * FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry where
    T0.cardcode = '%Supp' and T0.DocDate <=%FromDate
    and T0.DocDate >=%ToDate
    EXEC @return_value=SQL2XMLforINV
    @Fromdate= %FromDate,
    @ToDate= %ToDate,
    @Supp = '%Supp'
    SELECT 'Return Value' = @return_value
    And in SQL I have a stored procedure :
    Starting like this :
    PROCEDURE [dbo].[SQL2XMLforINV]
    @Fromdate datetime,
    @Todate datetime,
    @supp nvarchar(15)
    AS
    DECLARE @bcpCommand AS varchar(3000)
    declare @base nvarchar(50)
    BEGIN
         SET NOCOUNT ON;
    And my error message is in B1 ....
    Thanks in advance for your help ....

  • To connect a datablock to a query - stored procedure: problem

    I have the following table...
    CREATE TABLE I_TIPOLOGIA (
    CODICE NUMBER(6),
    DESCRIZIONE VARCHAR2(100),
    CONSTRAINT I_TIPOLOGIA_PK PRIMARY KEY (CODICE) );
    and the following package to connect a datablock to
    previous table with a stored procedure...
    CREATE or REPLACE PACKAGE DATABANKER_TIPOLOGIE AS
    TYPE TipTableOfRec IS TABLE OF I_TIPOLOGIA%ROWTYPE;
    PROCEDURE leggi(resultset IN OUT TipTableOfRec);
    END DATABANKER_TIPOLOGIE;
    CREATE or REPLACE PACKAGE BODY DATABANKER_TIPOLOGIE AS
    PROCEDURE leggi(resultset IN OUT TipTableOfRec) AS
    BEGIN
    SELECT * BULK COLLECT INTO resultset
    FROM I_TIPOLOGIA;
    END leggi;
    END DATABANKER_TIPOLOGIE;
    When I compile the form I receive in QUERY-PROCEDURE trigger
    en error 306: "number or type of arguments are wrong in POPULATE_BLOCK"
    I post the trigger auto generated by Forms Builder 6i...
    DECLARE
    bk_data DATABANKER_TIPOLOGIE.TIPTABLEOFREC;
    BEGIN
    DATABANKER_TIPOLOGIE.leggi3(bk_data);
    PLSQL_TABLE.POPULATE_BLOCK(bk_data, 'BLOCCO50'); -- <- error here
    END;
    How can I solve this problem? Maybe there is a bug?
    P.S. I'm using Oracle Database 9i

    CREATE or REPLACE PACKAGE DATABANKER_TIPOLOGIE AS
    TYPE TipTableOfRec IS TABLE OF I_TIPOLOGIA%ROWTYPE;
    PROCEDURE leggi(resultset IN OUT TipTableOfRec);
    END DATABANKER_TIPOLOGIE;I have solved with this replacement 1) -> 2)
    1) TYPE TipTableOfRec IS TABLE OF I_TIPOLOGIA%ROWTYPE;
    2) TYPE TipTableOfRec IS TABLE OF I_TIPOLOGIA%ROWTYPE
    INDEX BY BINARY_INTEGER;
    with 2) now works.
    Now I have stored-procedures for query, insert, delete
    and update.
    I have some problems with delete and update of the records
    because it seems that they are locked.
    I think that it is due to the absence of lock
    stored-procedure... there's someone that can help me with
    the lock SP implementation?

  • Need Help in with Querying Stored Procedures from UCCX Database

    Hi All
    We are trying to build a custom reporting solution using a BI tool and for which we have provided the ODBC connectivity to the UCCX database to our SQL server.
    We have installed the ODBC drivers on our SQL server and made a connection to UCCX version 10.0 successfully. we are using the username 'uccxhruser' to connect to the DSN.
    We want to query the stored procedure sp_csq_activity from the Microsoft SQL Server Management Studio. When we add the Linked Server in the SQL Server, we are able to see the Data Tables and also query them using the select statement. However, we are not able to see any of the Stored procedures within the Linked Server Tab.
    Can someone guide us in the right direction as to how to go about the process. Is calling the stored proedure the right way or we need to query the individual tables as mentioned in the Database Schema Guide and then once the historical tables our there in our server , then build the report.
    Any help will be much appreciated.
    Regards
    Abhinav

    Hi,
    what happens if you try to execute the above SP? They should be accessible AFAIK.
    G.

  • How to Return From Call to Stored Procedure

    I created an SQL Query Report portlet which contains a Delete
    link next to each record. If the user clicks on the link, it
    calls a JavaScript function which confirms the Delete and then
    calls a stored procedure which deletes the record. After the
    record is deleted, I get a page with,
    "No data returned from stored procedure
    The PL/SQL gateway invoked a stored procedure as part of
    processing the URL but the procedure returned no data."
    How can I get rid of this page and just return to the page that
    contains my report portlet after the stored procedure executes?
    Fran

    Hi Michael,
    I tried the following at the end of my procedure, but I still
    got the error page instead of the page containing the report
    portlet:
    --- return to calling page
    owa_util.redirect_url('http://pmim1a:7778/servlet/page?
    pageid=55&dad=portal30&_schema=PORTAL30');
    Fran

  • How to run a SQL Server Stored Procedure

    I need to run a SQL Server Stored Procedure in answer, the stored procedure use a hash table (temporary table) and I nedd to pass a parameter to stored procedure
    anyone know if is it possible in OBIEE, if yes how.
    thank you
    max

    thank you, but I'm not understand what you mean. I need to run this command in answer "direct access database"
    exec storedprocedure 1,1,1
    if I run this I receive thi error:
    error : [nQSError: 16001] ODBC error state: S0002 code: 208 message: [Microsoft][ODBC SQL Server Driver][SQL Server]object name '#TempList' not valid.. [nQSError: 16002] Cannot obtain number of columns for the query result. (HY000).
    here is the code of stored procedure:
    ROC [dbo].[GetOrderListmax]
    @OrderList varchar(500)
    AS
    BEGIN
    SET NOCOUNT ON
    CREATE TABLE #TempList
    OrderID int
    DECLARE @OrderID varchar(10), @Pos int
    SET @OrderList = LTRIM(RTRIM(@OrderList))+ ','
    SET @Pos = CHARINDEX(',', @OrderList, 1)
    IF REPLACE(@OrderList, ',', '') <> ''
    BEGIN
    WHILE @Pos > 0
    BEGIN
    SET @OrderID = LTRIM(RTRIM(LEFT(@OrderList, @Pos - 1)))
    IF @OrderID <> ''
    BEGIN
    INSERT INTO #TempList (OrderID) VALUES (CAST(@OrderID AS int)) --Use Appropriate conversion
    END
    SET @OrderList = RIGHT(@OrderList, LEN(@OrderList) - @Pos)
    SET @Pos = CHARINDEX(',', @OrderList, 1)
    END
    END
    SELECT o.OrderID, CustomerID, EmployeeID, OrderDate
    FROM dbo.Orders AS o
    JOIN
    #TempList t
    ON o.OrderID = t.OrderID
    END

  • How to use materialized view in stored procedure

    in my stored procedure I use couple of queries (see the script below). I want to create materialized views to replace these queries. Is it possible to achieve and how to achieve it in my case? thanks in advance
    set serveroutput on
    DECLARE
      v_cur_tid NUMBER(5):=0;
      v_cur_cs_attendance NUMBER(5):=0;
      v_cur_c_tot_enrolments NUMBER(5):=0;
      v_most_enrolments NUMBER(5):=0;
      v_least_enrolments NUMBER(5):=0;
      v_most_pop_cid NUMBER(5):=0;
      v_least_pop_cid NUMBER(5):=0;
      CURSOR class_cursor IS
    select
    id,
    name,
    max_attendees
    from
    class
    where
    id in (select distinct(event_id) from trainer_schedule where event_type='c' and is_active='y')
    order by id;
    BEGIN
    DBMS_OUTPUT.PUT_LINE('==================================================================================================================================');
    --print the report header
    DBMS_OUTPUT.PUT_LINE('Summary Report No.3: Training Class Active Schedules Summary Report');
    FOR r_class IN class_cursor LOOP
    --print the header or subsection
    select sum(enrolments) into v_cur_c_tot_enrolments from class_schedule where class_id = r_class.id;
    IF v_most_enrolments < v_cur_c_tot_enrolments OR v_most_enrolments = 0
    THEN v_most_enrolments := v_cur_c_tot_enrolments; v_most_pop_cid := r_class.id;
    END IF;
    IF v_least_enrolments > v_cur_c_tot_enrolments OR v_least_enrolments = 0
    THEN v_least_enrolments := v_cur_c_tot_enrolments; v_least_pop_cid := r_class.id;
    END IF;
    DBMS_OUTPUT.PUT_LINE('******************************************************************************************');
    DBMS_OUTPUT.PUT_LINE('CLASS_ID: '  || r_class.id ||'     '|| 'CLASS_NAME: '  || r_class.name ||'     '||'CAPACITY: '  || r_class.max_attendees ||'     '||'TOTAL_ENROLMENTS: '  || v_cur_c_tot_enrolments);
    DBMS_OUTPUT.PUT_LINE(rpad('____________', 12) || lpad('____________', 12) || lpad('____________________', 20) || lpad('____________________', 20) || lpad('____________',12) || lpad('____________',12));
    DBMS_OUTPUT.PUT_LINE(rpad('SCHEDULE_ID', 12) || lpad('TRAINER_ID',12) || lpad('START_TIME', 20) || lpad('END_TIME',20) || lpad('ENROLMENTS',12) || lpad('ATTENDANCE',12));
    DBMS_OUTPUT.PUT_LINE(rpad('____________', 12) || lpad('____________',12) || lpad('____________________', 20) || lpad('____________________', 20) || lpad('____________',12) || lpad('____________',12));
    FOR r_cs IN (select id,to_char(start_time,'DD-MM-YYYY HH24:Mi') as start_time, to_char(end_time,'DD-MM-YYYY HH24:Mi') as end_time, enrolments from class_schedule where class_id = r_class.id order by id)
    LOOP
    select trainer_id into v_cur_tid from trainer_schedule where event_type='c' and event_id = r_cs.id;
    select count(training_session.id) into v_cur_cs_attendance
    from training_session, class_schedule
    where training_session.attended = 'y' and
    training_session.type='c'and
    to_char(training_session.start_time,'DD-MM-YYYY HH24:Mi') = to_char(class_schedule.start_time,'DD-MM-YYYY HH24:Mi') and
    class_schedule.id = r_cs.id;
    DBMS_OUTPUT.PUT_LINE(rpad(r_cs.id, 12) || lpad(v_cur_tid,12) || lpad(r_cs.start_time, 20) || lpad(r_cs.end_time,20) || lpad(r_cs.enrolments,12) || lpad(v_cur_cs_attendance,12));
    END LOOP;
    END LOOP;
    DBMS_OUTPUT.PUT_LINE('******************************************************************************************');
    DBMS_OUTPUT.PUT_LINE('******************************************************************************************');
    DBMS_OUTPUT.PUT_LINE('MOST_POPULAR_CLASS:  '||v_most_pop_cid||'      TOTAL_ENROLMENTS_TO_DATE: '||v_most_enrolments);
    DBMS_OUTPUT.PUT_LINE('LEAST_POPULAR_CLASS: '||v_least_pop_cid||'      TOTAL_ENROLMENTS_TO_DATE: '||v_least_enrolments);
    DBMS_OUTPUT.PUT_LINE('==================================================================================================================================');
    END;
    /

    Hi,
    you could use Dynamic SQL /Execute immediate to run DDL from a stored procedure.
    http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96624/11_dynam.htm
    Could you please tell why do you want to create a materialized view in stored procedure ?
    How frequently you will runt this procedure . It would is better to create a MV once and use it.
    thanks

  • How to kill a  session in stored procedure or trigger.

    Can anyone let me know, how to kill a particular session in stored procedure or trigger.
    Regards
    KVSS

    also you cannot attempt to kill ur own current session.
    But on what circumstances you want to kill the session.
    When anyone trys to access a table and lets suppose the trigger onthat table activates
    and you want to kill that very session which activated the trigger ???
    i dont think its possible. To kill a session definitely you should be in a different session and
    then only you can achieve that.
    pls check it out
    prakash
    [email protected]

  • How to use @jws:sql call Stored Procedure from Workshop

    Is there anyone know how to use @jws tag call Sybase stored procedure within
    Workshop,
    Thanks,

    Anurag,
    Do you know is there any plan to add this feature in future release? and
    when?
    Thanks,
    David
    "Anurag Pareek" <[email protected]> wrote in message
    news:[email protected]..
    David,
    In the current release, we do not support calling stored procedures from a
    database control. You will have to write JDBC code in the JWS file to call
    stored procedures.
    Regards,
    Anurag
    Workshop Support
    "David Yuan" <[email protected]> wrote in message
    news:[email protected]..
    Anurag,
    I know how to use DB connection pool and create a db control with it. In
    fact, we have created a Web Service with the db control using plain SQL
    in
    @jws:sql. However, my question here is how to use @jws tag in Weblogic
    Workshop to create a Web Services based on Sybase stored procedure orany
    Stored Proc not plain SQL.
    Thanks,
    David
    "Anurag Pareek" <[email protected]> wrote in message
    news:[email protected]..
    David,
    You can use a database control to obtain a connection from any JDBC
    Connection Pool configured in the config.xml file. The JDBC Connectionpool
    could be connecting to any database, the database control is
    independent
    of
    that.
    Regards,
    Anurag
    Workshop Support
    "David Yuan" <[email protected]> wrote in message
    news:[email protected]..
    Is there anyone know how to use @jws tag call Sybase stored
    procedure
    within
    Workshop,
    Thanks,

  • How to create csv file in stored procedure

    I want the output of my stored procedure in a csv file. How can I do that?

    1) define File Paths
    2) Write the output comma seperated to the file.
    Simple :)
    Hope you are comfortable with File operations.
    URL for your reference
    PL/SQL output to .CSV file
    Regards,
    Bhushan

  • How to get sequence nextvalue in stored procedure?

    Hi, guys,
    I am trying to obtain the nextvalue of a sequence in a stored procedure, ultimately this value shall be returned to caller, but how do I assign or get the sequence value inside a stored procedure?
    Thanks
    jim

    foo NUMBER;
    SELECT mysequence.nextval INTO foo FROM DUAL;

Maybe you are looking for

  • Can't receive mail and lost mail

    Just went to mail and found existing mail  had disappeared. Not receiving new mail. Where do i find it? Receiving on iphone & ipad. The stored mail & received mail on iphone & ipad. Just got a problem with the imac.

  • Work repository on different database configuration

    Hello there, I am trying to set my work repository to be a schema on differing database to the source dataserver. Currently when I edit the source data server and try to set the work repository I only have the option to select schemas from the source

  • B2B 11g - Managing File name from a JMS queue.

    Hi, I have configured a Listening Channel to use Generic File 1.0 (to poll a file from local dir) and send it to a Trading Partner. In B2B User Guide it has been said to have the file name as %TO_PARTY%_%DOCTYPE_NAME%_%DOCTYPE_REVISION%_%MESSAGE_ID%_

  • Need a phone with enlarging fonts ability!

    Please I need the following information! What Nokia series phones, or special phones have the ability in software to enlarge fonts??? I had problem with E65 and I sold it because of this (it was an excellent phone)!! Please help me out in this!!

  • Names of DIV tags

    Hi there and thanx for your help. Just want know: Can <div> tags (id and class) have number as name? For instance: <div id="12345"> I have a script for disjointed rollovers. The moment I name the div tags exactly as the name of the product, something