With the help of the POLL with Execute Immediate clause

I wrote a query to update a table and return the column in a variable of type table nested using the return clause but its not working, I am getting error like

ORA-06550: line 66, column 22:
PLS-00306: wrong number or types of arguments in the call to ' |'
ORA-06550: line 66, column 4:
PL/SQL: Statement ignored

I get the error message in part of my request to the suite

|| "RETURN If_row_status in bulk collect INTO"
|| v_if_row_status;


Referred to as v_if_row_status-
TYPE v_count IS the TABLE OF varchar2 (50) INDEX directory.
v_if_row_status v_count;

The original message listed error about concatenation, but the code in response to scott.wesley had no concatenation. Have you tried to revise the update process? What is a different issue, unrelated to the first?

The best thing to do would be to create a cursor, loop through it and use a simple update for each row. Updates complex as the one you are trying to use are very difficult to manage. By using a loop to insert/update, you can have control over the process and have access to all values, you must use more later in advance instead of having to use the RETURN clause.

Insert bulk can be more effective, but is difficult to manage for the great updates.

Tags: Database

Similar Questions

  • FORALL with EXECUTE IMMEDIATE

    Hi all

    I'm using Oracle 11 g Release2.

    I need to use the forall with EXECUTE IMMEDIATE statement and the content of string inside EXECUTE IMMEDIATE is a SELECT instead of the usual DML statement.

    Objective: In this SELECT statement, I'll be passing of data using the "USING" clause in FORALL statement

    When I try to use it, am getting error found "no DATA".

    Please advice if I use FORALL and EXECUTE IMMEDIATE on a SELECT statement?

    I can share the scenario...

    Thank you!

    >
    Please advice if I use FORALL and EXECUTE IMMEDIATE on a SELECT statement?
    >
    No - you can't. See the specifications of the PL/SQL language
    http://docs.Oracle.com/CD/E14072_01/AppDev.112/e10472/forall_statement.htm
    >
    dml_statement

    An INSERT, UPDATE, or DELETE static or dynamic statement making reference at least a collection in its VALUES or the WHERE clause. Performance benefits apply only to references to the collection that use as an index index_name.

  • Need help with EXECUTE IMMEDIATE

    I'm tring to issue an EXECUTE IMMEDIATE to create a DIRECTORY. My problem is that I'm in the "'... ''...'' '...'' ' mess!

    source_instance VARCHAR2 (30);
    Select sys_context ('USERENV', 'DB_NAME') in the double source_instance;

    IMMEDIATE EXECUTION
    ' CREATE OR REPLACE DIRECTORY "DATA_HUB_". source_instance LIKE "/ mnt/smb/share/layout scene/DataHub /" | source_instance';

    I am hopeing to get:
    CREATE or REPLACE DIRECTORY DATA_HUB_MYDB AS ' / mnt/smb/share/layout DataHub/scene/MYDB ";

    I'm on Oracle 11.1


    Thank you!

    I wonder why people do not use q' syntax. It was introduced in 10g

       EXECUTE IMMEDIATE q'#CREATE OR REPLACE DIRECTORY DATA_HUB_#' || source_instance || q'# AS '/mnt/smb/share/Staging/DataHub/#' || source_instance || q'#'#'; 
    

    Concerning

    Pavol Babel

  • How to create and insert data with Execute Immediate?

    Hi guys

    Am stuck on a procedure of formatting in a package... script works okay however integrating a module turns out to be difficult!

    Am not used to oracle... I have the script runs, but not in the package... Well not all that... Drop Table worked

    CREATE or REPLACE PACKAGE BODY is

    PROCEDURE DropTable1 IS

    BEGIN

    run immediately ("DROP TABLE mytable1");

    END;

    PROCEDURE PopulateTable1 IS

    BEGIN

    immediately execute ('CREATE TABLE mytable1 )

    AS LONG AS)

    Select

    substr (T1.genarea, 3, 3) as M_Class,

    substr (T1.genarea, 6, 30) as M_Description,

    substr (T1.genarea, 36, 3) as M_Class,

    substr (T1.genarea, 39, 30) as M_Description,

    substr (T1. ItemItem, 1, 3) as product_code,.

    T3. CHANNEL_NUM as SALES_CHANNEL,

    to_date(''t2.time_id'',''dd-mon-yyyy'') as mis_date,

    Sum (T2.ap_cw_cfi_irp + T2.ap_cw_issues_irp) as ap_gross,

    sum (t2. Ap_Cw_Cfi_Irp + t2. Ap_Revivals_Irp) as ap_net,

    Sum (T2.sp_inc_irp + T2.sp_issues_irp) as sp_gross,

    Sum (T2.sp_dec_irp + T2.sp_fs_irp) as sp_net

    Of

    d_pr t1, t2 age_map t3 law

    where

    T1.pfx = "WE"and t1.coy ="1" and t1.tabl = "T81" and substr (t1.itemitem, 1, 3) = t2.product_id and t3. AGE_NUM = t2.age_id

    Group

    substr (T1.genarea, 3, 3),

    substr (T1.genarea, 6, 30),

    substr (T1.genarea, 36, 3),

    substr (T1.genarea, 39, 30),

    substr (T1. ItemItem, 1, 3).

    T3. CHANNEL_NUM,

    to_date(''t2.time_id'',''dd-mon-yyyy'')

    )');

    COMMIT;

    END PopulateTable1;

    END test;

    /

    Thank you

    Hello

    a few notes.

    1. to_date(t2.time_id,'dd-mon-yyyy')

    New York T2.Time_ID Cis the varchar2 data type that contains values to JJ-me-YYYY format?

    And if, in which language is used for the names of the months? Conversions are point impossible to solve in reasonable time limits without logging of dml errors and unique failure on charges of staging nightly!


    2 single quote escaping "alternative in string literals.

    You can use Q or q to escape single quotes in strings.

    http://docs.Oracle.com/database/121/SQLRF/sql_elements003.htm#SQLRF00218

    3. validation

    Not required because the DDL commands commit implied.

    In general I recommend you write commit clauses only in calling script rather than in the code unless it connects with an autonomous transaction.

    You end up with a lot of validation of code here and there and you don't know where it is and where it isn't. That is, your process may have more than one appeal process and commit the middle of the process, it is not atomic processes.

    Here's the demo although I recommend also using the static table and truncate to efficiency. ETG is good choice for the purpose of maintenance table.

    create or replace
    package testing is
      procedure staging_one;
    end;
    /
    create or replace
    package body testing is
      --
      procedure staging_one is
        --
        procedure drop_staging_one is
          table_does_not_exist exception;
          pragma exception_init(table_does_not_exist, -00942);
        begin
          execute immediate q'{
            drop table staging_one purge
          }';
        exception when table_does_not_exist then
          return; -- fine
        end;
        --
        procedure create_staging_one is
        begin
          execute immediate q'{
    
            -- remove >>>
            create table staging_one nologging
            as
            select * from dual
            -- <<< remove
    
            /* uncomment >>>
            create table staging_one nologging
            as
            select
              substr(t1.genarea,3,3)                    as m_class,
              substr(t1.genarea,6,30)                   as m_description,
              substr(t1.genarea,36,3)                   as m_class,
              substr(t1.genarea,39,30)                  as m_description,
              substr(t1.itemitem,1,3)                   as product_code,
              t3.channel_num                            as sales_channel,
              to_date(t2.time_id,'dd-mon-yyyy')         as mis_date,
              sum(t2.ap_cw_cfi_irp+t2.ap_cw_issues_irp) as ap_gross,
              sum(t2.ap_cw_cfi_irp+t2.ap_revivals_irp)  as ap_net,
              sum(t2.sp_inc_irp   +t2.sp_issues_irp)    as sp_gross,
              sum(t2.sp_dec_irp   +t2.sp_fs_irp)        as sp_net
            from
              d_pr t1,
              act t2,
              age_map t3
            where
              t1.pfx                      = 'IT'
              and t1.coy                  = '1'
              and t1.tabl                 = 'T81'
              and substr(t1.itemitem,1,3) = t2.product_id
              and t3.age_num              = t2.age_id
            group by
              substr(t1.genarea,3,3),
              substr(t1.genarea,6,30),
              substr(t1.genarea,36,3),
              substr(t1.genarea,39,30),
              substr(t1.itemitem,1,3),
              t3.channel_num,
              to_date(t2.time_id,'dd-mon-yyyy')
            <<< uncomment */
          }';
          --
        end;
      -- main
      begin
        drop_staging_one;
        create_staging_one;
      end;
    end;
    /
    
    set serveroutput on
    
    exec testing.staging_one;
    
    select * from staging_one
    ;
    commit
    ;
    
    PACKAGE TESTING compiled
    PACKAGE BODY TESTING compiled
    anonymous block completed
    DUMMY
    -----
    X 
    
    committed.
    
  • Storing the values of execute immediate instruction.

    Hi all
    I execute immediate statement that gets several rows at a time. I need to save this picture and print. Pleas elte the syntax me to use an array or temp table in oracle. See the code provided below.
    Thank you...
    declare
    v_ct varchar2 (290);
    v_sqlcode number: = 0;
    v_stmt varchar2 (2900);
    r_tbl VARCHAR2 (150);
    cursor c_tbl is
    Select the table TABLE_NAME from DBA_TABLES where OWNER = 'ted '.
    Start
    Open c_tbl;
    loop
    extract the c_tbl in r_tbl;
    When the output c_tbl % notfound;
    v_stmt: = 'select NULLABLE from DBA_TAB_COLUMNS WHERE TABLE_NAME =' | " ' || r_tbl | " ' |' and COLUMN_NAME in (select column_name from DBA_IND_COLUMNS where INDEX_NAME = (select 'INDEX_NAME' from DBA_INDEXES where TABLE_NAME =' | ")) ' || r_tbl | " ((' |' and UNIQUENESS = "UNIQUE"))';
    run immediately v_stmt in v_ct;
    v_sqlcode: = SQLCODE;
    If v_sqlcode = 0
    then dbms_output.put_line (v_ct);
    end if;
    end loop;
    close c_tbl;
    end;

    Your immediate question seems to be answered.

    I would like to point out a few problems with your code, however.

    First of all, it seems pointless to use dynamic SQL here - you can use a static SQL statement to get the same data. You can use static SQL, you should.

    Secondly, if you want to use dynamic SQL statements, you should really use bind variables. Something like

      v_stmt := 'select NULLABLE from DBA_TAB_COLUMNS WHERE TABLE_NAME = :1 and COLUMN_NAME in (select column_name from DBA_IND_COLUMNS where INDEX_NAME= (select "INDEX_NAME" from DBA_INDEXES where TABLE_NAME =':2 and UNIQUENESS =''UNIQUE''))';
      execute immediate v_stmt
          bulk collect into v_ct
        using r_tbl, r_tbl;
    

    Third, your deepest query is to select the literal 'INDEX_NAME' rather than the name of the actual index. Unless you happen to have an index named INDEX_NAME, who is likely to be a mistake.

      v_stmt := 'select NULLABLE from DBA_TAB_COLUMNS WHERE TABLE_NAME = :1 and COLUMN_NAME in (select column_name from DBA_IND_COLUMNS where INDEX_NAME= (select INDEX_NAME from DBA_INDEXES where TABLE_NAME =':2 and UNIQUENESS =''UNIQUE''))';
      execute immediate v_stmt
          bulk collect into v_ct
        using r_tbl, r_tbl;
    

    Fourth, unless you can be sure that the table has a unique index, your query will return an error because the deepest returns multiple lines.

      v_stmt := 'select NULLABLE from DBA_TAB_COLUMNS WHERE TABLE_NAME = :1 and COLUMN_NAME in (select column_name from DBA_IND_COLUMNS where INDEX_NAME in (select INDEX_NAME from DBA_INDEXES where TABLE_NAME =':2 and UNIQUENESS =''UNIQUE''))';
      execute immediate v_stmt
          bulk collect into v_ct
        using r_tbl, r_tbl;
    

    Justin

    Published by: Justin Cave on August 5, 2011 23:28

  • ORA-01031 on create sequence with Execute Immediate

    I have the following statement in a procedure:
    EXECUTE IMMEDIATE
      ' CREATE SEQUENCE my_seq
        INCREMENT BY 1
        START WITH 130224
        NOMINVALUE
        NOMAXVALUE
        NOCYCLE
        NOCACHE';
    When the statement is executed, I get an ORA-01031: insufficient privileges error.

    I can run the CREATE statement in sqlplus. The schema from which I executed the CREATE statement is the same as that under which the procedure is run. In addition, the procedure is also created in the same schema.

    What a privilege I'm missing?

    Your privilege CREATE SEQUENCE given to you through a role.

    Roles are not considered in the stored procedures, you must have the privilege granted directly to your user name.

  • Problem in Using of EXECUTE IMMEDIATE clause

    Hello
    I tried using using the clause, but am getting an error. Any help is welcome.

    Here is the code

    declare
    number of g_salary;
    v_stm varchar2 (100);
    Start
    v_stm: = "insert into emp (empno, deptno, sal) values (: 1,: 2: 3)"; "
    execute immediate v_stm using empno, sal, deptno;
    end;


    Here is the error message

    ERROR on line 1:
    ORA-06550: line 6, column 31:
    PLS-00201: identifier 'EMPNO' must be declared.
    ORA-06550: line 6, column 1:
    PL/SQL: Statement ignored

    You must provide values that must be inserted into the table.
    something like

    declare
       g_salary number ;
       v_stm varchar2(100);
    begin
       v_stm := 'insert into emp (empno, deptno, sal) values (:1, :2, :3)';
       execute immediate v_stm using 10, 20, 30;
    end;
    

    not tested

  • EXECUTE IMMEDIATE or DBMS_UTILITY. EXEC_DDL_STATEMENT

    Hello

    I recently became aware of DBMS_UTILITY. EXEC_DDL_STATEMENT and I was wondering if it works in pretty much the same way as EXECUTE IMMEDIATE. I'm guessing that EXECUtE IMMEDIATE offers more flexibility when putting together the command you want to run, but you are the only real difference? All opinions accepted with gratitude,

    Kind regards

    Kevin.

    This isn't an exact answer to your question, but it may be useful.

    Execute Immediate is the approach privileged 9i or higher. If you decide which to use, go with EXECUTE IMMEDIATE. You never know when the other dynamic SQL methods will be deprecated. In addition, EXECUTE IMMEDIATE has also been optimized (and will continue to be optimized), so you can usually expect better performance during use.

    The exact differences between EXECUTE IMMEDIATE and DBMS_UTILITY. EXEC_DDL_STATEMENT go, I can't give you an exact answer. (Also the fact that DBMS_UTILITY. EXEC_DDL_STATEMENT DDL is, of course).

    You may or may not find this article helpful: http://okjsp.pe.kr/seq/9789. He did a good job to compare the differences between EXECUTE IMMEDIATE and another way inherited to the dynamic SQL statements (DBMS_SQL. RUN)

    Bob

  • Execute Immediate is not working well

    We need to find tables with the same name and columns but these columns whose data type is different. The SQL below detects the difference.
    select a.table_name, a.column_name, 
    a.data_type ||'---> '||a.owner BASE_SCHEMA_TYPE, 
    b.data_type ||'---> '||B.owner COMPARED_SCHEMA_TYPE 
    from all_tab_columns a, all_tab_columns b  where a.owner =
    'SCOTT' and b.owner = 'HR'  and a.table_name=b.table_name and
    a.column_name=b.column_name and a.data_type!=b.data_type
    Based on the SQL above, I created the procedure mentioned below which takes a base as input parameter schema and find these tables with the same name but have different data type columns. It generates dynamic SQL code properly (you can see in DBMS_OUTPUT) but for some reason, the INSERT is not the case with EXECUTE IMMEDIATE. No idea why?
    create or replace procedure admin.compare_data_types (p_baseschema in varchar2)
    is
    v_sql   varchar2(2000);
    begin
    
    delete from admin.differences;
    commit;
    
    for rec in (select  username from  dba_users where Username IN ( 'HR'))
    loop
    
      v_sql := 'insert into admin.differences select a.table_name, a.column_name, a.data_type ||''---> ''||a.owner BASE_SCHEMA_TYPE, b.data_type ||''---> ''||B.owner COMPARED_SCHEMA_TYPE from all_tab_columns a, all_tab_columns b      where a.owner = '''||p_baseschema||''' and b.owner = '''||rec.username||'''  and a.table_name=b.table_name and a.column_name=b.column_name and a.data_type!=b.data_type';
         
         dbms_output.put_line (v_sql);
         execute immediate v_sql;
         --commit; -- Doesn't make any difference
         --v_sql := null; -- Doesn't make any difference
         
    
    
    end loop;
    commit;
    
    end compare_data_types;
    Structure of the table being INSERT ed
    create table admin.DIFFERENCES
    (
      TABLE_NAME           VARCHAR2(200),
      COLUMN_NAME          VARCHAR2(200),
      BASE_SCHEMA_TYPE     VARCHAR2(100),
      COMPARED_SCHEMA_TYPE VARCHAR2(100)
    )

    How about putting in a debug message to see what he does...

    (don't forget to ' set serveroutput we "before...)

    create or replace procedure admin.compare_data_types (p_baseschema in varchar2)
    is
    v_sql   varchar2(2000);
    begin
    
    delete from admin.differences;
    commit;
    
    for rec in (select  username from  dba_users where Username IN ( 'HR'))
    loop
    
    insert into admin.differences
    select a.table_name
          ,a.column_name
          ,a.data_type ||'---> '||a.owner BASE_SCHEMA_TYPE
          ,b.data_type ||'---> '||B.owner COMPARED_SCHEMA_TYPE
      from all_tab_columns a
          ,all_tab_columns b
     where a.owner          = p_baseschema  -- Procedure Paramater
       and b.owner          = rec.username
       and a.table_name     = b.table_name
       and a.column_name    = b.column_name
       and a.data_type!=b.data_type;
    
     dbms_output.put_line('Rows Inserted for '||rec.username||': '||sql%rowcount);
    end loop;
    commit;
    
    end compare_data_types;
    

    And see if it is one) enter the loop and b) the number of rows is inserted during the process.

    If it displays 0 rows inserted, then there's something of logically wrong with your select statement, as is return nothing.

  • EXECUTE IMMEDIATE and multiple SQL

    Hello
    I get a string, say strSQL from an application.
    for example:

    strSQL: = "CREATE UNIQUE INDEX 'WEBDBTARGET'". "" PK_EMPID6"ON"WEBDBTARGET ". "" EMP_R1 "("EMPID")
    PCTFREE, INITRANS 10 2 MAXTRANS 255 COMPUTE STATISTICS
    STORAGE (INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645)
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 DEFAULT USER_TABLES)
    TABLESPACE "TARGET_TS_01";

    CREATING INDEX 'WEBDBTARGET '. "' MARK ' ON 'WEBDBTARGET '. "" EMP_R1 "("EMPNAME")
    PCTFREE, INITRANS 10 2 MAXTRANS 255 COMPUTE STATISTICS
    STORAGE (INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645)
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 DEFAULT USER_TABLES)
    TABLESPACE «TARGET_TS_01 "«;»

    I tried to run the strSQL using EXECUTE IMMEDIATE

    get the error
    * "PLS-00103: encountered the symbol"end-of-file"when it is waiting for one of the following values: *"
    *; < an ID > < a between double quote delimited identifiers of > *.
    * The symbol ";" was replaced by "end-of-file" continue. » *

    I understand that the question is after the first SQL.
    How to use EXECUTE IMMEDIATE if the input string contains multiple SQL?
    Help, please.

    TIA,
    Newbie

    user570138 wrote:
    strSQL: = "CREATE UNIQUE INDEX 'WEBDBTARGET'". "" PK_EMPID6"ON"WEBDBTARGET ". "" EMP_R1 "("EMPID")
    PCTFREE, INITRANS 10 2 MAXTRANS 255 COMPUTE STATISTICS
    STORAGE (INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645)
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 DEFAULT USER_TABLES)
    TABLESPACE "TARGET_TS_01";

    CREATING INDEX 'WEBDBTARGET '. "' MARK ' ON 'WEBDBTARGET '. "" EMP_R1 "("EMPNAME")
    PCTFREE, INITRANS 10 2 MAXTRANS 255 COMPUTE STATISTICS
    STORAGE (INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645)
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 DEFAULT USER_TABLES)
    TABLESPACE 'TARGET_TS_01"';'

    You have extra quote (marked in red). But remove won't solve all of your problems. EXECUTE IMMEDIATE executes a SQL statement. You must divide in two strSQL:

    strSQL:=' CREATE UNIQUE INDEX "WEBDBTARGET"."PK_EMPID6" ON "WEBDBTARGET"."EMP_R1" ("EMPID")
    PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "TARGET_TS_01"';
    EXECUTE IMMEDIATE strSQL;
    CREATE INDEX "WEBDBTARGET"."SDSDSD" ON "WEBDBTARGET"."EMP_R1" ("EMPNAME")
    PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "TARGET_TS_01"';
    EXECUTE IMMEDIATE strSQL;
    

    SY.
    P.S. in the majority of cases it IT not a good design of database to create objects dynamically.

  • dml execution 2 statements at a time with the help of execute immediate

    I would like to run 2 DML statements at a time with the help of execute immediate usefulness,.

    ex:

    update employee set ename = 'Chantal' where eno = 123;
    Update dept set dname = 'IT' where dno = 345;

    I want the two statement to execute at a time, but I don't want to use any loop as well.

    Thanks in advance

    You can use:

    execute immediate 'begin update employee set ename='jagadeesh' where eno=123; update dept set dname='IT' where dno=345; end;';
    

    Although updates will always run one after the other.

    If you want the simultaneous treatment, then you need to use DBMS_JOB and DBMS_SCHEDULER to plan both work to run to run each of the statements independently.

  • How to filter the result with a where clause clause?

    Hello

    I have a nice sql query. I would like to include a where clause with a joker clause.

    If the user selects for example a "AGENT_ID", then where clause would include the AGENT_ID, otherwise, every thing would appear.
    SELECT 
       "FICHE"."FICHE_ID" "FICHE_ID", 
       "FICHE"."AGENT_ID" "AGENT_ID", 
       "FICHE"."EQUIPE_ID" "EQUIPE_ID", 
       "FICHE"."DATE_ACTIVITE" "DATE_ACTIVITE", 
       "FICHE"."DATE_CREATION" "DATE_CREATION", 
       "FICHE"."TYPE_FICHE" "TYPE_FICHE", 
       "FICHE"."FICHE_CREE_PAR" "FICHE_CREE_PAR", 
       "FICHE"."TOTAL_HEURES" "TOTAL_HEURES", 
       "FICHE"."TOTAL_HEURES_EXCEPTIONNELLES" "TOTAL_HEURES_EXCEPTIONNELLES", 
       "FICHE"."DATE_MODIFICATION" "DATE_MODIFICATION"
    FROM 
       "FICHE"
    The WHERE clause:
    WHERE AGENT_ID = ' * ' if nothing is selected.

    WHERE AGENT_ID = "4290" If an agent ID is selected.

    Hope I'm clear that English is not my mother tongue.

    Thanks for you help.

    Christian

    Hello

    Try this

    WHERE "FICHE".AGENT_ID like NVL(:val, '%')
    

    see you soon

    VT

  • Open FPGA references change to no. target when compiled with executable in time real start

    Hello again you useful forum fans!  I have a problem that I hope someone can give me a hand with.

    I have a project that has a Windows component and a component of the target in real time, that are running on a hypervisor type NI PXI-8110 system.  Communication both sides between them using shared variables.

    On the real-time side, I have four FPGA targets who are reading and writing various analog and discrete inputs and outputs.  I several periods loops which opens a reference to one of the FPGA targets during the first call, then pass this reference in several subVIs that read and write to panels prior to the FPGA.  The loops the FPGA reference thus made available and reuse it in the next iteration through the shift registers.  Each FPGA target has only a single reference open to him.  One of the loops is using the FPGA reference directly and does not pass it in any subVIs.

    It all works very well in the development environment, I can read and control inputs and outputs FPGAS via the front panel of the application of the side Windows.  It also works very well if I start the game real time in the development environment, and run the code of windows as a stand-alone executable file.

    However, when I compile the code in real-time in an executable startup and deploy it to the target, it does not work.  I enabled debugging on the executable, and when I connect to it via the operation-> debug executable in the menu, I see an arrow broken at execution.  Further investigation shows that each of the four open screw reference FPGA is now empty, the text under them is "no target" and the thread for reference on their part to my first Subvi is broken.  I need your help to understand how to operate as it does in the development environment.

    I followed the instructions of these two knowledge base articles to compile and download the bitfiles FPGA on the FPGA target and execute on start or restart:

    http://digital.NI.com/public.nsf/allkb/39795847AC67296D862575FB0046944F

    http://digital.NI.com/public.nsf/allkb/BC513C2A0DC29C89862574BF0002B0B9?OpenDocument

    Open FPGA reference screw are configured for the FPGA to build specifications that I created for each target in the LabVIEW FPGA project.

    I called technical support, NO phone, and yet were able to determine this one out, so additional "brownie" points if you do!  I would offer you the same no detailed screenshot that I have (I can't give more detailed code out because its owner, unfortunately), but apparently the forum doesn't like my image file, as I can't seem to load.

    Please let me know if you have any ideas regarding what is happening!  I appreciate it.

    Jon,

    I'm always up for the challenge.  Have you tryied recompile the FPGA VI that accesses the RT VI?  I also suggest to try and open the bitfile instead of the FPGA VI.  You run in dynamic mode (this is not a suggestion, it's just a question)? There is no difference if you try to open the FPGA VI reference outside the while loop, then past the reference to use inside the while loop without shift registers, then close the reference to the FPGA VI outside the while loop?

    Let me know if these suggestions makes no difference.

  • use of the server for executable files VI

    Hi all

    I tried to find a good explanation and example usage of VIserver to launch executables on client PC (XP) via a LAN to a PC (Win7) process controller. Basically, what I found for the controller is specified in this code snippet:

    The following was placed in the .ini file of the target at the time of construction to allow VIserver using an executable file (?):

    Server.TCP.Enabled = True
    Server.TCP.Access = "' + * '"
    Server.TCP.port = 3364
    Server.TCP.ACL = "290000000A000000010000001D00000003000000010000002A10000000030000000000010000000000"
    Server.VI.Access =""
    server.vi.callsEnabled = True
    server.vi.propertiesEnabled = True

    If a reference to an instance of application LV is open on the computer command on a specified port, and then a VI reference target

    for the .vi file (another instance?) opens on the same target for manipulation of knot VI. So what was lost for me is the executable

    I am trying to run the file. May not be wired to the terminal way to "ref Open VI". This implementation requires the .exe version and the version of VI

    I am trying to run the code? I launched with success of executable files over a LAN using plink with a script file. Problem is that I can't find a way

    get the target executables once loaded. There is most likely a C solution for this (I'll take it if anyone knows!), but since has VIserver of tools

    to control the execution, I would use it. Also, I want to understand the version of VI of the programme and the .exe in this case (s) link

    Version. Any help would be greatly appreciated.

    lb

    Ben OK,

    Your messages made me a technique to load with distance and running an exe file, built in LV8.5:

    1. to load: the controller emits a "tasklist" command to a target. The objective produces an output file of tasklist which is read by the controller. If it concludes that the target is already loaded, the controller will execute it with an invoke command node 'run a VI '.

    2. If the target is not loaded, then a script file is executed on the target via plink of the controller. This command will also start running.

    3. all the subVIs must reside on the target, as you said, even if (as in my case), the target has no LV Developer Suite installed. I placed Traoré versions of files and folders to exe in the same folder.

    4. the .ini file in the compilation has changed as shown in the first post of this thread. No special settings were used in the compilation.

    This probably isn't the exact technique you had in mind, but it doesn't seem to work... Thanks again for your help.

    lb

  • This VI belongs to a class of LabVIEW. No part of the class is executable at this time, because one of the screws is missing. However, I'm not missing a vi

    I have only 1 vi and its not to miss.  1 vi advertising the library owner has blocked enforcement of the VI.  The class has the error "this VI belongs to a class of LabVIEW. No part of the class is executable at this time, because one of the screws is missing. Find Member missing screws on the disk and load them into memory or remove them from the definition of class in the project tree. »

    But there is only 1 member vi! ??

    I had a lot of other vi through this class, but somehow this class failed with this error.  I removed all vi directory and the definition of class and just done re the a vi reviewer and still have the error message.

    I enclose my ridiculously simple class.

    I have other classes that work very well, but somehow it seems to have gotten sloppy.  I really need to understand what happened here and how get/avoid this error, or I wouldn't have the confidence to develop large scale applications using classes.

    In other words... Help, please!

    Your class contains two screws a VI is called Untitled 1 and the other reading Max level.vi.

    Maybe this could happen (not tested) as follows. You have created two screws and saved one of them as reading Max level.vi. Then, you have saved the class. When the classyou of fence chose not to save untitled 1 and not to save the class.

    How to fix it. Open the class file with any text editor. Remove all lines between and including the following lines in the file:


       

    This will fix your class.

Maybe you are looking for

  • Time Capsule backups of different networks?

    I have a Time Capsule that serves ONLY to expand my current network, but is also used for the backup of a single computer through Time Machine. If I take this time capsule to a new place, which has a different network I can configure it to join the n

  • Can't turn on Camileo P10

    Have a problem with a newly purchased digital camera camileo p10. I unfold the battery, connect the camera to the cable in order to get power, but it won't work even after an hour and a half of attachment of power... What I hold more long stuck in or

  • Is it possible to extract personal folders from my hard drive and transfer to an external hard drive if Windows does not start?

    Hello, I recently started my Windows XP Dell computer and it should start up normally unless it would run the ChkDsk utility. It would freeze then 68% on stage 1 and goes no further. I called the people of Dell and after trying so many solutions, inc

  • Sort contacts by name in Windows Mail

    Original title: managing windows mail contacts Trying to manage the contacts file; import express outlook .csv files and other sources; I put "Sort by name" and it will ignore the command list "sort by name"; can find no "smart search" feature that h

  • Frames in Nexus 5000

    Hello: We have 2 Nexus 5000 Switch with n5000 - uk9.5.0.3.N2.2.bin system image file. 2 Nexus divided in 2 centres and directly connected. In each of the switches, there is an Oracle server. These Oracle servers are grouped and connected by a link of