queue, a dynamic container type

Hello

I have several threads running, each waiting for an input queue (queue names are numbered by threads: "Queue0", "Queue1",...) and expects a type of individual container as an entry in the queue.

I have variables for all these containers, also numbered by the threads of entry: FileGlobals.Input0, FileGlobals.Input1,...

Now I would like to send these containers of entry via the queues for different wires in a loop in TestStand, for example, something like (in pseudo-code representing steps in a sequence):

thread = 1 to n

Enqueue (Queuename = Str (wire, "queue %d"); Element to the queue: Str (thread, "FileGlobals.Input %d"))

end

I tried the queue

FileGlobals.GetPropertyObject (Str (wire, "Input %d"), 0)

and the end of the queue gives me an error about an incompatible type being removed. I also tried the same thing with 'AsPropertyObject', doesn't work anymore.

Is there a way to do this?

Thank you

Peter

Hi Peter,.

Yes it is possible if you use Evaluate().

Just look at the example

concerning

Jürgen

Tags: NI Software

Similar Questions

  • Plot multiple charts XY (dynamic data type)

    Hello world

    I searched but could not find the solution. I'm tracing several XY graphs with dynamic data type.

    I have here an example five 2D-arrays of X/axis Y to draw.

    I need them in dynamic data in order to trace in Diadem using Diadem protocol.vi.

    I get all the values of the X/Y axis as values Y.

    Any help is really appreciated,

    Yan.


  • ORA-19279: XPTY0004 - dynamic XQuery type mismatch: expected - singleton sequence got several sequence element

    Hello

    Can you please help me by questioning from the following XML code.

    under query works for the 1 iteration. but for several games I get following error.

    ORA-19279: XPTY0004 - dynamic XQuery type mismatch: expected - singleton sequence got several sequence element

    19279 00000 - "dynamic XQuery type mismatch: expected - singleton sequence got several sequence element.

    * Cause: The sequence of XQuery passed was more than one element.

    * Action: Fix the XQuery expression to return a single element of the sequence.

    Help, please

    Select X.*

    ABC evt

    , XMLTABLE (XMLNAMESPACES ('urn:swift:xsd:mtmsg.2011' AS NS2, DEFAULT 'urn:swift:xsd:fin.970.2011'),

    "$msg_xml" by PASSING EVT.col1 as 'msg_xml '.

    COLUMNS

    Path Varchar (40) F61ValueDate "/ F61/ValueDate [1]."

    Path of DebitCreditMark Varchar (40) "/ / Document/MT970/F61a/F61/DebitCreditMark [1]."

    Amount Varchar (40) path ' / / Document/MT970/F61a/F61/amount [1]. "

    Path of TransactionType Varchar (40) "/ / Document/MT970/F61a/F61/TransactionType [1]."

    Path of IdentificationCode Varchar (40) "/ / Document/MT970/F61a/F61/IdentificationCode [1]."

    Path of ReferenceForTheAccountOwner Varchar (40) "/ / Document/MT970/F61a/F61/ReferenceForTheAccountOwner [1]."

    Path of SupplementaryDetails Varchar (40) "/ / Document/MT970/F61a/F61/SupplementaryDetails [1].

    ) X

    where EVT.col2 = 2

    < FinMessage xmlns = "urn:swift:xsd:mtmsg.2011" xmlns:FinMessage ="urn:swift:xsd:mtmsg.2011" > "
    < Block1 >
    < ApplicationIdentifier > F < / ApplicationIdentifier >
    < ServiceIdentifier > 01 < / ServiceIdentifier >
    < LogicalTerminalAddress > IRVTDEFXAXXX < / LogicalTerminalAddress >
    < open > 5252 < / open >
    < SequenceNumber > 699163 < / SequenceNumber >
    < / Block1 >
    < Block2 >
    < OutputIdentifier > O < / OutputIdentifier >
    < > 970 MessageType < / MessageType >
    < > 1633 InputTime < / InputTime >
    < MessageInputReference >
    < date > 131101 < / Date >
    < LTIdentifier > EBASBEBBQ < / LTIdentifier >
    < BranchCode > XXX < / BranchCode >
    < open > 1113 < / open >
    < n > 070016 < / ISN >
    < / MessageInputReference >
    < date > 131101 < / Date >
    < time > 1634 < / Time >
    < MessagePriority > N < / MessagePriority >
    < / Block2 >
    < Block3 >
    ENS0000857017566 < F108 > < / F108 >
    < / Block3 >
    < canton4 >
    < xmlns = "urn:swift:xsd:fin.970.2011 document" xmlns:Document ="urn:swift:xsd:fin.970.2011" > "
    < MT970 >
    < F20a >
    ENS17566/END of < F20 > < / F20 >
    < / F20a >
    < F25a >
    < F25 > IRVTDEFX/EUR/131101/N < / F25 >
    < / F25a >
    < F28a >
    < F28C >
    < StatementNumber > 215 < / StatementNumber >
    < SequenceNumber > 16 < / SequenceNumber >
    < / F28C >
    < / F28a >
    < F60a >
    < F60M >
    < DCMark > D < / DCMark >
    < date > 131101 < / Date >
    < currency > EUR < / currency >
    < amount > 2686836,28 < / amount >
    < / F60M >
    < / F60a >
    < F61a >
    < F61 >
    < valueDate > 131101 < / ValueDate >
    < DebitCreditMark > D < / DebitCreditMark >
    < amount > 40248, < / amount >
    < TransactionType > S < / TransactionType >
    < IdentificationCode > 103 < / IdentificationCode >
    < ReferenceForTheAccountOwner > FX5445414 < / ReferenceForTheAccountOwner >
    < SupplementaryDetails > KREDBEBBXXXIRVTDEFXXXXN011031 < / SupplementaryDetails >
    < / F61 >
    < / F61a >
    < F61a >
    < F61 >
    < valueDate > 131101 < / ValueDate >
    < DebitCreditMark > D < / DebitCreditMark >
    < amount > 41605, < / amount >
    < TransactionType > S < / TransactionType >
    < IdentificationCode > 103 < / IdentificationCode >
    < ReferenceForTheAccountOwner > FX5443846 < / ReferenceForTheAccountOwner >
    < SupplementaryDetails > DEUTDEFFXXXIRVTDEFXXXXN011031 < / SupplementaryDetails >
    < / F61 >
    < / F61a >
    < F61a >
    < F61 >
    < valueDate > 131101 < / ValueDate >
    < DebitCreditMark > D < / DebitCreditMark >
    < amount > 43730, < / amount >
    < TransactionType > S < / TransactionType >
    < IdentificationCode > 103 < / IdentificationCode >
    < ReferenceForTheAccountOwner > C13110130526301 < / ReferenceForTheAccountOwner >
    < SupplementaryDetails > BARCGB22XXXIRVTDEFXXXXN011033 < / SupplementaryDetails >
    < / F61 >
    < / F61a >
    < F61 >
    < valueDate > 131101 < / ValueDate >
    < DebitCreditMark > D < / DebitCreditMark >
    < amount > 58000, < / amount >
    < TransactionType > S < / TransactionType >
    < IdentificationCode > 202 < / IdentificationCode >
    < ReferenceForTheAccountOwner > FXT1311010000500 < / ReferenceForTheAccountOwner >
    < ReferenceOfTheAccountServicingInstitution > FXT1311010000500 < / ReferenceOfTheAccountServicingInstitution >
    < SupplementaryDetails > BKAUATWWXXXIRVTDEFXXXXN011116 < / SupplementaryDetails >
    < / F61 >
    < / F61a >
    < F61a >
    < F61 >
    < valueDate > 131101 < / ValueDate >
    < DebitCreditMark > D < / DebitCreditMark >
    < amount > 59826,21 < / amount >
    < TransactionType > S < / TransactionType >
    < IdentificationCode > 103 < / IdentificationCode >
    < ReferenceForTheAccountOwner > FX5446070 < / ReferenceForTheAccountOwner >
    < SupplementaryDetails > CHASGB2LXXXIRVTDEFXXXXN011031 < / SupplementaryDetails >
    < / F61 >
    < / F61a >
    < F61a >
    < F61 >
    < valueDate > 131101 < / ValueDate >
    < DebitCreditMark > D < / DebitCreditMark >
    < amount > 60309,4 < / amount >
    < TransactionType > S < / TransactionType >
    < IdentificationCode > 103 < / IdentificationCode >
    < ReferenceForTheAccountOwner > 01987HS016415 < / ReferenceForTheAccountOwner >
    < SupplementaryDetails > EFGBGRAAXXXIRVTDEFXXXXN011458 < / SupplementaryDetails >
    < / F61 >
    < / F61a >
    < F62a >
    < F62M >
    < DCMark > D < / DCMark >
    < date > 131101 < / Date >
    < currency > EUR < / currency >
    < amount > 3736765,9 < / amount >
    < / F62M >
    < / F62a >
    < / MT970 >
    < / document >
    < / canton4 >
    < / FinMessage >

    Thank you

    Siva Prakash

    under query works for the 1 iteration. but for several games I get following error.

    When you want to present the groups repeating in relational format, you must extract the sequence of elements of the main XQuery expression.

    Each element is then spent the COLUMNS clause to be more shredded into columns.

    This should work as expected:

    Select x.*

    ABC t

    xmltable)

    XmlNamespaces)

    default 'urn:swift:xsd:fin.970.2011 '.

    , 'urn:swift:xsd:mtmsg.2011' as 'ns0 '.

    )

    , ' / ns0:FinMessage / ns0:Block4 / Document/MT970/F61a/F61 '

    in passing t.col1

    columns F61ValueDate Varchar (40) Path 'ValueDate '.

    , Path of the DebitCreditMark Varchar (40) "DebitCreditMark".

    , Varchar (40) path 'Amount' rise

    , Path TransactionType Varchar (40) "TransactionType".

    , Path of the IdentificationCode Varchar (40) "IdentificationCode".

    , Path of the ReferenceForTheAccountOwner Varchar (40) "ReferenceForTheAccountOwner".

    , Path of the SupplementaryDetails Varchar (40) "SupplementaryDetails".

    ) x ;

  • Dynamic XQuery Type mismatch (ORA-19279)

    Hello

    I'm "ORA-19279: XPTY0004 - dynamic XQuery type mismatch: expected - singleton sequence got several sequence element" error with the XML block below. Query works well when there is no repeating element XML block (address, income and phone). In addition, the query looks good from a performance perspective?

    with the trial as (select xmltype

    ("" < SampleRequest = xmlns:ns0 "http://abc.org/SampleRequest/one" xmlns ="http://abc.org/SampleRequest/one" > ")

    < ns0:Address >

    < ns0:AddressType >

    < CurrAdrInd xmlns = "" > Y < / CurrAdrInd >

    < OutOfAreaInd xmlns = "" > N < / OutOfAreaInd >

    < YearDur xmlns = "" > 15 < / YearDur >

    < MthDur xmlns = "" > 0 < / MthDur >

    < / ns0:AddressType >

    < AdrLine1 xmlns = "" > line 1 < / AdrLine1 >

    < AdrLine2 xmlns = "" > line 2 < / AdrLine2 >

    < AdrLine3 xmlns = "" > line 3 < / AdrLine3 >

    < Name xmlns = "" > city < / name >

    < PostCd xmlns = "" > 123456 < / PostCd >

    < / ns0:Address >

    < ns0:Address >

    < ns0:AddressType >

    < CurrAdrInd xmlns = "" > N < / CurrAdrInd >

    < OutOfAreaInd xmlns = "" > Y < / OutOfAreaInd >

    < YearDur xmlns = "" > 5 < / YearDur >

    < MthDur xmlns = "" > 0 < / MthDur >

    < / ns0:AddressType >

    < AdrLine1 xmlns = "" > line 1 < / AdrLine1 >

    < AdrLine2 xmlns = "" > line 2 < / AdrLine2 >

    < AdrLine3 xmlns = "" > line 3 < / AdrLine3 >

    < Name xmlns = "" > city < / name >

    < PostCd xmlns = "" > 987654 < / PostCd >

    < / ns0:Address >

    < ns0:Customer >

    < TitleCd xmlns = "" > Mr < / TitleCd >

    < FrstName xmlns = "" > customer 1 < / FrstName >

    < midName xmlns = "" / >

    < name xmlns = "" > LAST < / LastName >

    < BrthDt xmlns = "" > 1979-06-21 < / BrthDt >

    < / ns0:Customer >

    < ns0:Income >

    < IncmTypeCd xmlns = "" > gross < / IncmTypeCd >

    < IncmAmt xmlns = "" > 2700 < / IncmAmt >

    < / ns0:Income >

    < ns0:Income >

    < IncmTypeCd xmlns = "" > other < / IncmTypeCd >

    < IncmAmt xmlns = "" > 1500 < / IncmAmt >

    < / ns0:Income >

    < ns0:Telephone >

    < PhnNumTypeCd xmlns = "" > home < / PhnNumTypeCd >

    < PhnAreaCd xmlns = "" > 123 < / PhnAreaCd >

    < PhnNum xmlns = "" > 123467 < / PhnNum >

    < / ns0:Telephone >

    < ns0:Telephone >

    < PhnNumTypeCd xmlns = "" > work < / PhnNumTypeCd >

    < PhnAreaCd xmlns = "" > 987 < / PhnAreaCd >

    < PhnNum xmlns = "" > 9876543 < / PhnNum >

    < / ns0:Telephone >

    < / SampleRequest >

    clob_xml') of double)

    Select x.* from the test,

    XMLTable (xmlnamespaces ('http://abc.org/SampleRequest/one' as "ns0"),)

    ' for $i in /ns0:SampleRequest

    Return $i' from clob_xml

    columns

    path of varchar2 (10) ttl_cd ' / / ns0:Customer / TitleCd',

    path of varchar2 (32) frst_nm ' / / ns0:Customer / FrstName ",

    path of varchar2 (1) mid_nm ' / / ns0:Customer / MidName',

    "path of varchar2 (32) last_nm ' / / ns0:Customer / LastName."

    date path brth_dt ' / / ns0:Customer / BrthDt',

    path of varchar2 (1) curr_adr_ind ' / / ns0:Address / ns0:AddressType / CurrAdrInd',

    path of varchar2 (1) out_of_area_ind ' / / ns0:Address / ns0:AddressType / OutOfAreaInd',

    path number (3) tm_at_adr_year_dur ' / / ns0:Address / ns0:AddressType / YearDur',

    path number (2) tm_at_adr_mth_dur ' / / ns0:Address / ns0:AddressType / MthDur',

    path of varchar2 (32) flat_num ' / / ns0:Address / AdrLine1',

    path of varchar2 (32) hse_num ' / / ns0:Address / AdrLine2',

    path of varchar2 (32) hse_nm ' / / ns0:Address / AdrLine3',

    path of varchar2 (32) town_nm ' / / ns0:Address / name ',

    path of varchar2 (8) post_cd ' / / ns0:Address / PostCd',.

    path of varchar2 (1) incm_type_cd ' / / ns0:Income / IncmTypeCd',

    path number (10) incm_amt ' / / ns0:Income / IncmAmt',

    path of varchar2 (2) phn_num_type_cd ' / / ns0:Telephone / PhnNumTypeCd',

    path of varchar2 (5) phn_num_area_cd ' / / ns0:Telephone / PhnAreaCd',

    path of varchar2 (12) phn_num ' / / ns0:Telephone / PhnNum'

    ) x ;

    Kind regards

    Chandra KenR

    Thanks, that's much clearer this way.

    For example, to retrieve information related to income:

    SQL > select x.*

    tmp_xml 2 t

    3, xmltable)

    4 xmlnamespaces ('http://abc.org/SampleRequest/one' as "ns0")

    5, ' / ns0:SampleRequest'

    6 passage t.object_value

    7 columns

    8 path of varchar2 (10) ttl_cd ' ns0:Customer / TitleCd'

    "9 road to varchar2 (32) frst_nm ' ns0:Customer / FrstName"

    10 road of varchar2 (1) mid_nm ' ns0:Customer / MidName'

    "11 road of varchar2 (32) last_nm ' ns0:Customer / LastName"

    12, date of brth_dt path ' ns0:Customer / BrthDt'

    13, path number (10) grs_incm_amt ' ns0:Income [IncmTypeCd = "Raw"] / IncmAmt'

    14 road number (10) oth_incm_amt ' ns0:Income [IncmTypeCd = 'Other'] / IncmAmt'

    (15) x

    16;

    TTL_CD FRST_NM MID_NM LAST_NM BRTH_DT GRS_INCM_AMT OTH_INCM_AMT

    ---------- -------------------------------- ------ -------------------------------- ----------- ------------ ------------

    Mr. customer 1 LAST 21/06/1979 2700-1500

    On your question about performance:

    Yes, there are some general guidelines to follow to get the best performance of the execution of XQuery.

    Those are the storage dependent and independent storage, with greater importance of the former.

    For example, in the test case above, I first stored the XML in a binary table of XMLType (TMP_XML): it is an optimization of storage-dependent.

    I also removed all the descendants axis (/ /) for path expressions: those who were not needed and should be avoided if the exact location of the target node is known, this is typically an independent optimization of storage.

    You will find everything you need to know in details here:

    http://www.Oracle.com/technetwork/database-features/xmldb/overview/xmldb-bpwp-12cr1-1964809.PDF

  • ORA-19279: XPTY0004 - dynamic XQuery type mismatch

    Hi all
    When I run select it below the statement I had the "ORA-19279: XPTY0004 - dynamic XQuery type mismatch: expected - singleton sequence got several sequence element" oracle error.
    select valtag 
      from XMLTABLE( '/root'
                     passing XMLTYPE('<root>
                                                  <subroot><valtag>6666446612</valtag></subroot>
                                                  <subroot><valtag>6666446613</valtag></subroot>
                                      </root>'
                                     ) 
                    Columns
                          valtag varchar(20) path 'subroot/valtag'
                   ) s
    required result:
    VALTAG
    ---------------
    6666446612
    6666446613
    Please let me know where I made the mistake?

    Thank you
    RAM.

    Published by: Rama Krishna.CH on November 26, 2012 15:48

    Please let me know where I made the mistake?

    The main manifestation of XQuery (here = ' / root ') defines what will be the relational lines based on the result set.
    (Strictly speaking, this expression must return a sequence of elements)

    Here, so you want the element subroot be your 'line':

    SQL> select s.valtag
      2  from XMLTABLE( '/root/subroot'
      3         passing XMLTYPE('
      4             6666446612
      5             6666446613
      6           ')
      7         Columns
      8            valtag varchar(20) path 'valtag'
      9       ) s
     10  ;
    
    VALTAG
    --------------------
    6666446612
    6666446613
     
    
  • Dynamic cursor Type strong?

    I am currently using Oracle 11.2 G and I was wondering if you can declare a dynamic cursor as a strong Ref Cursor type or it may be declared as weak type ref cursor? Now, if she can only be declared as a weak type Ref Cursor, is it possible to avoid having to explicitly declare the type names and field being returned by the cursor? Sense, is any way to avoid having to do something like that...
    TYPE example_rec IS RECORD
    (
     col1 VARCHAR2,
     col2 NUMBER,
     col3 NUMBER,
     etc...
    )
    Instead, I was wondering if I could just set the fields and their types by defining them as a TABLE OF THE ref cursor?

    I wonder if this is possible is because I have a large number of fields returned in my cursor, and I was hoping on not having to type each person and its type. In addition, I think this would make maintenance easier.

    user652714 wrote:
    No, not quite. I ask if I can create a strong dynamic type Ref cusors. Here is a Pseudo code:

    DECLARE
    TYPE test_rec IS TABLE OF test_cur%ROWTYPE; -- i'm wondering if i can do something like this
    --'The code below is what I am TRYING TO AVOID'
    TYPE test_cur IS REF CURSOR;
    TYPE test_rec IS RECORD
    (
    col1 VARCHAR2,
    col2 NUMBER,
    col3 NUMBEr
    )
    

    Is not possible.

    Let's say you would set an TEST_REC as above. How would refer to the members of the structure of your code? This type could describe anything like projection of the cursor could be anything - a unique column, to a 100 columns. A combination of columns that can include data types of the LOB of tables nested SQL types defined by the user.

    So, how can you refer to these columns in the structure of table TEST_REC ? Guess?

    A new concept - all SQL statements are parsed, stored and executed as sliders. REF CURSOR, cursors implicit, explicit cursors and so on, are CLIENT interfaces to the created SQL cursor. Each of these interfaces to client cursor works in a specific way and provide a set of specific features.

    Next concept - to extract a SQL cursor, the client code NEEDS to know the structure of the projection of this cursor SQL. The code needs to know the number and types of data in the columns returned by the cursor.

    The customer may address the issue in two ways.

    Statically. In other words, at the time of coding, SQL projection, returned by this SQL cursor is known. The developer can thus use some thing like + % RowType % + to indicate to the compiler that record structure to define. The compiler parses the SQL cursor in the code, describes the projection of SQL and compiles this projection of SQL as the static structure in the code.

    + % RowType + in this regard is as a #define of C macro. He tells the PL/SQL compiler to describe the cursor SQL projection, then produced a PL/SQL, based on the record structure.

    Dynamically. This means at the time of coding, SQL, returned by this SQL cursor is unknown. In this case the compiler has no idea at compile time what structure will be returned by the cursor. Compiled source code may not define a static structure for this cursor SQL - the SQL cursor may return any kind of structure. The source code needs to use the same approach as what the compiler does when it comes to SQL static cursors.

    The source code needs to analyze the cursor, describe the SQL cursor and then pick dynamically by the cursor. Client cursor interface that supports this approach is DBMS_SQL. No ref Cursor.

    Keep in mind that these static and dynamic methods to describe how the code consumes the cursor - extraction of rows in the cursor.

    A static method (where the projection of SQL is known) however apply to the TWO instructions static SQL and dynamic SQL statements. You can use dynamic SQL statements in your code, but a rule which stipulates that, regardless of the SQL code is waiting for a specific static SQL projection of this SQL cursor.

    The dynamic method (where the projection of SQL is unknown) is 'real' dynamic SQL - as the projection of SQL and are all two dynamic SQL code.

    Examples of Basic code:

    // STATIC SQL CURSOR
    SQL> create or replace procedure FooProc is
      2          cursor  c is select object_id, object_name from user_objects;
      3          type    TBuffer is table of c%RowType;
      4          buffer  TBuffer;
      5  begin
      6          open c;
      7          loop
      8                  fetch c bulk collect into buffer limit 100;
      9                  DBMS_OUTPUT.put_line( buffer.Count||' row(s) fetched.' );
     10                  exit when c%NotFound;
     11          end loop;
     12          close c;
     13  end;
     14  /
    
    Procedure created.
    
    SQL>
    SQL> exec FooProc
    100 row(s) fetched.
    43 row(s) fetched.
    
    PL/SQL procedure successfully completed.
    
    // STATIC SQL PROJECTION, BUT DYNAMIC SQL CURSOR
    SQL> create or replace procedure FooProc( c in out sys_refcursor ) is
      2          E_CURSOR_ERROR  exception;
      3          pragma exception_init( E_CURSOR_ERROR, -00932 );
      4          type    TRecord is record(
      5                          name varchar2(30),
      6                          value varchar2(100)
      7                  );
      8          type    TBuffer is table of TRecord;
      9          buffer  TBuffer;
     10  begin
     11          loop
     12                  fetch c bulk collect into buffer limit 100;
     13                  DBMS_OUTPUT.put_line( buffer.Count||' row(s) fetched.' );
     14                  exit when c%NotFound;
     15          end loop;
     16          close c;
     17  exception when E_CURSOR_ERROR then
     18          close c;
     19          raise_application_error(
     20                  -20000,
     21                  'Cursor projection contains an invalid data structure.'
     22          );
     23  end;
     24  /
    
    Procedure created.
    
    SQL> var c refcursor
    SQL> exec open :c for select object_id, object_name from user_objects;
    
    PL/SQL procedure successfully completed.
    
    SQL> exec FooProc( :c );
    100 row(s) fetched.
    43 row(s) fetched.
    
    PL/SQL procedure successfully completed.
    
    SQL> exec open :c for select object_id, object_name, created from user_objects;
    
    PL/SQL procedure successfully completed.
    
    SQL> exec FooProc( :c );
    BEGIN FooProc( :c ); END;
    
    *
    ERROR at line 1:
    ORA-20000: Cursor projection contains an invalid data structure.
    ORA-06512: at "BILLY.FOOPROC", line 19
    ORA-06512: at line 1
    
    // DYNAMIC SQL AND DYNAMIC SQL PROJECTION
    SQL> create or replace procedure FooProc( sqlSelect varchar2 ) is
      2          c               integer;
      3          rc              integer;
      4          colCnt          integer;
      5          fetchCnt        integer;
      6          projection      DBMS_SQL.DESC_TAB;
      7  begin
      8          --// ceate and parse the cursor
      9          c := DBMS_SQL.open_cursor;
     10          DBMS_SQL.parse(
     11                  c,
     12                  sqlSelect,
     13                  DBMS_SQL.native
     14          );
     15
     16          rc := DBMS_SQL.execute( c );
     17
     18          --// describe the sql projection
     19          DBMS_SQL.describe_columns( c, colCnt, projection );
     20
     21          --// the sql projection's fields/columns
     22          DBMS_OUTPUT.put_line( 'SQL projection:' );
     23          for i in 1..colCnt loop
     24                  DBMS_OUTPUT.put_line( '- '||projection(i).col_name );
     25          end loop;
     26
     27          --// fetch and process
     28          fetchCnt := 0;
     29          loop
     30                  rc := DBMS_SQL.fetch_rows( c );
     31                  exit when rc = 0;
     32                  --// use DBMS_SQL.column_value() to read fetched row's columns
     33                  fetchCnt := fetchCnt + 1;
     34          end loop;
     35          DBMS_OUTPUT.put_line( fetchCnt||' row(s) fetched.' );
     36
     37          DBMS_SQL.close_cursor( c );
     38  end;
     39  /
    
    Procedure created.
    
    SQL>
    SQL> exec FooProc( 'select object_id, object_name from user_objects' );
    SQL projection:
    - OBJECT_ID
    - OBJECT_NAME
    143 row(s) fetched.
    
    PL/SQL procedure successfully completed.
    
  • Track of multiple graphs on a single diagram of waveform with dynamic data types

    I'm putting multiple charts on a single diagram of waveform and data contract error. I was wondering if it has something to do with the fact that the dynamic data is used (I have had no problem with other types of data in the past). Does anyone know how to fix this? I have attached the following .VI. There will be a lot of. Live on the bottom which does not load, but they are not related to this problem.

    Thank you!

    Brian

    I don't know what you're doing now, but a part of your origianl code is simply ridiculous. Your DAQ assistant takes a single point. You convert that into an array. If you had converted into a scalar value (which is) first place, your graphics update would have been fine.

    If you want to remove the DAQ Assistant, and then select generate DAQmx code. You'll be a little more closely, but it seems that it generates a NChan DAQmx Read 1Samp instead of a 1Chan 1Samp DAQmx read.

  • Question about the Manager of messages in queue and dynamically load/close Subvi

    Hi, my dear LV users

    I learn how to use the machine in queue Sate Architecture. I created a simple project, including a "main.vi" to dynamically load a sub vi 'sub_Vi2.vi' in the case of "initialize". The sub vi simply open a configuration file and load affecting some control and write these values in the configuration file. If the configuration file is not created, the sub vi creates until the user closes the Subvi.

    In the case of "Get out" of my "main.vi", I send 'true' to the Subvi stop button to stop running it. But the sub vi did not write these values back to the configuration file, or created a new when I delete the configuration file.

    There is another vi I made 'main1.vi', which loads dynamically and close the Subvi. And it works as well as I expected: create the file and write data!

    Can someone help me understand the code? I've also attached the front of diagrams and source code. It's in 2012 LV.

    Best regards

    Li CQ


  • passage of queue to dynamically called VI

    In my application, I have two screws. IIn a VI I create a queue and then I spend the Ref. of the queue for the other VI and launch this VI dynamically.

    While running any VI can stop regardless of the status of the other VI.

    but as soon as I stop the VI who created the queue. the Ref. of the queue becomes invalid. and dynamic VI cannot use the queue more

    I want to the queue to be eliminated that after I explicitly call has queue function.

    How can I achieve that

    Hey Tushar,

    You can create a "functional Global ' which encapsulates the function Create tail and buffer the reference to the queue in a registry to offset.  The VI may have two modes of operation: CreateQueue and ReadReference.  The top-level VI he would run in Design Mode, and the VI dynamically saying would just continue to use the playback mode.  Since this VI remains a VI performance left even after the parent process ends, the queue reference, allocations will remain valid.

    See you soon!

  • Not a container type

    I'm working on the upgrade of 10.2 and the merging of my Q & Z bars with active static selector, but at the launch of the app a container as a separate page, I had created becomes a mistake

    "Unable to get asset in (/apps/workingdir/native/assets/): (/720x720/main.qml)."
    bb::cascades::QmlDocument: error when loading QML from:   QUrl( "asset:///720x720/main.qml" )
    --- errors:  (asset:///720x720/main.qml:1333:13: ExteriorContainer is not a type)
    

    Currently, in main.qml, it is configured as

    Container {
        id: root
    
        ExteriorContainer {
             id: exteriorContainer
             //content
        }
    }
    

    Since I left the qml liabilities for/assets/720 x 720 files there at - it another way I'm supposed to initiate a container of a separate qml file?

    Well, I found a solution

    I created a folder named Q and all moved from 720 x 720 to him

    folder included in the .pro

    application that runs without problem =)

    Static active CyA selector

  • Dynamic XQuery type mismatch

    I have the following. How to avoid the dynamic type mismatch?

    < ResGuests >

    < ResGuest >

    profile of <>

    < ProfileInfo >

    < Type UniqueID = "21" ID = "3558" / >

    < profile >

    < TPA_Extensions >

    < TPA_Extension >

    < DRI_INFO MemberLevel = GuestType "s/o" = "GST" / > "

    < / TPA_Extension >

    < / TPA_Extensions >

    < customer >

    < PersonName >

    < name > Ws < / name >

    D. JAMES < GivenName > < / GivenName >

    < / PersonName >

    < / customer >

    < / profile >

    < / ProfileInfo >

    < ProfileInfo >

    < Type UniqueID = "21" ID = "3568" / >

    < profile >

    < TPA_Extensions >

    < TPA_Extension >

    < DRI_INFO MemberLevel = GuestType "s/o" = "Assistant Director General" / > "

    < / TPA_Extension >

    < / TPA_Extensions >

    < customer >

    < PersonName >

    < name > M < / name >

    < GivenName > GUY < / GivenName >

    < / PersonName >

    < / customer >

    < / profile >

    < / ProfileInfo >

    < / profile >

    < / ResGuest >

    < / ResGuests >

    SELECT lengthofstay

    boarding

    resvtype

    devices

    membertype

    IN n_lengthofstay

    n_amount_to_charge

    v_resvtype

    n_num_devices

    v_member_type

    FROM XMLTABLE)

    xmlnamespaces (DEFAULT 'http://www.opentravel.org/OTA/2003/05'), ' / OTA_ResRetrieveRS'

    PASSAGE mxml

    COLUMNS lengthofstay VARCHAR2 (2000)

    Path "ReservationsList/HotelReservation/Services/Service/TPA_Extensions/TPA_Extension/WiFiFees/@LengthOfStay".

    TOLL number

    Path "ReservationsList/HotelReservation/Services/Service/TPA_Extensions/TPA_Extension/WiFiFees/@AmountBeforeTax".

    , resvtype VARCHAR2 (2000)

    Path "ReservationsList/HotelReservation/RoomStays/RoomStay/RoomRates/RoomRate/@BookingCode".

    Number of devices

    Path "ReservationsList/HotelReservation/Services/Service/TPA_Extensions/TPA_Extension/WiFiFees/@NumberConnections".

    , membertype VARCHAR2 (2000)

    Path "ReservationsList/HotelReservation/ResGuests/ResGuest/Profiles/ProfileInfo/Profile/TPA_Extensions/TPA_Extension/DRI_INFO/@MemberLevel");

    I would be able to extract the data in a given table?

    This is not really to the point.

    First, you must decide how to deal with the various nodes of type of repetition, we could meet in the XML file.

    If you want extract as a single flat tabular structure or rather as separate entity sets?

    If flattening is OK, then something like this will not work on your current sample XML:

    DECLARE
        x_xml          CLOB
            := '
    
       
       
          
       
       
          
             
             
                
                   
                      
                         
                      
                   
                
             
             
                
                   
                      
                         
                         
                            
                               
                                  
                               
                            
                            
                               
                                  Winters
                                  JAMES D.
                               
                            
                         
                      
                      
                         
                         
                            
                               
                                  
                               
                            
                            
                               
                                  M
                                  GUY
                               
                            
                         
                      
                   
                
             
             
                
                   
                   
                      
                         
                            
                         
                      
                   
                   
                
             
          
       
    ';
        mxml           XMLTYPE;
    
        TYPE data_rec IS RECORD
        (
            lengthofstay   NUMBER
           ,chargeable     NUMBER
           ,resvtype       VARCHAR2 (2000)
           ,devices        NUMBER
           ,membertype     VARCHAR2 (2000)
           ,guesttype      VARCHAR2 (2000)
        );
    
        TYPE results IS TABLE OF data_rec;
    
        a_results      results;
    
    BEGIN
        mxml        := xmltype (x_xml);
    
        SELECT x1.lengthofstay
             , x1.chargeable
             , x1.resvtype
             , x1.devices
             , x2.membertype
             , x2.guesttype
        BULK COLLECT INTO a_results
        FROM XMLTABLE (
               XMLNamespaces (DEFAULT 'http://www.opentravel.org/OTA/2003/05')
             , '/OTA_ResRetrieveRS/ReservationsList/HotelReservation'
               PASSING mxml
               COLUMNS lengthofstay VARCHAR2(2000)  PATH 'Services/Service/TPA_Extensions/TPA_Extension/WiFiFees/@LengthOfStay'
                     , chargeable   NUMBER          PATH 'Services/Service/TPA_Extensions/TPA_Extension/WiFiFees/@AmountBeforeTax'
                     , resvtype     VARCHAR2(2000)  PATH 'RoomStays/RoomStay/RoomRates/RoomRate/@BookingCode'
                     , devices      NUMBER          PATH 'Services/Service/TPA_Extensions/TPA_Extension/WiFiFees/@NumberConnections'
                     , profiles     XMLType         PATH 'ResGuests/ResGuest/Profiles/ProfileInfo'
             ) x1
           , XMLTABLE (
               XMLNamespaces (DEFAULT 'http://www.opentravel.org/OTA/2003/05')
             , '/ProfileInfo/Profile/TPA_Extensions/TPA_Extension/DRI_INFO'
               PASSING x1.profiles
               COLUMNS memberType  VARCHAR2(2000)   PATH '@MemberLevel'
                     , guestType   VARCHAR2(2000)   PATH '@GuestType'
             ) x2 ;
    
        for i in 1 .. a_results.count loop
          DBMS_OUTPUT.put_line (   a_results(i).lengthofstay
                                || ' -->'
                                || a_results(i).chargeable
                                || ' -->'
                                || a_results(i).resvtype
                                || ' -->'
                                || a_results(i).devices
                                || ' -->'
                                || a_results(i).membertype
                                || ' -->'
                                || a_results(i).guesttype
                                );
        end loop;
    END;
    /
    

    output:

    5--> 0--> REN--> 4--> N / A--> GST

    5--> 0--> REN--> 4--> N / A--> ADG

    but as said, don't forget that it will fail as soon as there is more than one Service, ideal or RoomRate node.

  • ORA-19279: XPTY0004 - dynamic XQuery type mismatch: expected singleton GL entry

    Hello
    My version of db: database Oracle 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production

    I run this code:
        SELECT *
        FROM XMLTABLE (
            '/rowset/row/businessgroups'
            PASSING XMLPARSE (DOCUMENT '<?xml version="1.0"?>
    <rowset>
    <row>
    <model>xt100</model>
    <businessgroups>
      <businessgroup>retail</businessgroup>
      <businessgroup>restaurant</businessgroup>
    </businessgroups>
    </row>
    </rowset>')
            COLUMNS businessgroup VARCHAR2(30) PATH 'businessgroup')
    
    error:
    ORA-19279: XPTY0004 - XQuery dynamic type mismatch: expected singleton sequence - got multi-item sequence
    The error is coming as I walked him several elements in the xml file.
    Is it possible to modify the code to get a list of the businessgroups, as below
    output:
    retail
    restaurant
    If I make a few changes in the code, I get the output as below, but I want as above:
    retailrestaurant
    Please advice.
    Connected to Oracle Database 11g Enterprise Edition Release 11.1.0.7.0
    Connected as apps
    
    SQL>
    SQL> SELECT *
      2      FROM XMLTABLE (
      3          '/rowset/row/businessgroups'
      4          PASSING XMLPARSE (DOCUMENT '
      5  
      6  
      7  xt100
      8  
      9    retail
     10    restaurant
     11  
     12  
     13  ')
     14          COLUMNS businessgroup VARCHAR2(30) PATH 'businessgroup')
     15  /
    
    SELECT *
        FROM XMLTABLE (
            '/rowset/row/businessgroups'
            PASSING XMLPARSE (DOCUMENT '
    
    
    xt100
    
      retail
      restaurant
    
    
    ')
            COLUMNS businessgroup VARCHAR2(30) PATH 'businessgroup')
    
    ORA-19279: XPTY0004 - XQuery dynamic type mismatch: expected singleton sequence - got multi-item sequence
    
    SQL>
    SQL>
    SQL> SELECT *
      2      FROM XMLTABLE (
      3          '/rowset/row/businessgroups/businessgroup'
      4          PASSING XMLPARSE (DOCUMENT '
      5  
      6  
      7  xt100
      8  
      9    retail
     10    restaurant
     11  
     12  
     13  ')
     14          COLUMNS businessgroup VARCHAR2(30) PATH '.')
     15  /
    
    BUSINESSGROUP
    ------------------------------
    retail
    restaurant
    
    SQL> 
    
  • When to use dynamic account Types

    I inherited an application with just a little or the accounts which are calculated through rules.  These calculations may very be in dynamic sub.  There are 1 = account 2 + 3 account... for example.  Can someone give me it experience or knowledge of best practices to follow to use dynamic account or not?  Thank you.

    Hello

    I agree with Erich Ranz , it seems that dynamic accounts were built for simple calculations that apply to all levels of the hierarchy of entities.

    Dynamic accounts are calculated when you load the rules and, of course, when you load new data. However, you are not able to create complex dynamic accounts.

    Kind regards

    Thanos

  • Before adding a new TF, remove any TF container 'type here '.

    Code below: whenever a button is clicked the code creates a new TF.

    By mistake if a user clicks on the button of newTF_btn more than once, how can I delete the previous TF? Basically, I need to delete any TF which is not in use. (don't use no = TF with "Type here")

    {newTF_btn.onRelease = function ()}

    createTF(anchor_mc._x+tl.anchor_mc._width/2,anchor_mc._y,""); "

    }

    function createTF(x:Number,y:Number,s:String):Void {}

    If (tfNum_mc.tf.text == "Type here") {}

    This._parent.removeMovieClip (); does not

    var tfNum_mc:MovieClip = tl.attachMovie ("tfID", "tfNum_mc_", tl.getNextHighestDepth ());

    s = tfNum_mc.tf.text;

    tfNum_mc.tf.border = true;

    tfNum_mc.tf.background = true;

    tfNum_mc.tf.backgroundColor = 0xffffff;

    tfNum_mc.tf.text = "Type here";

    }

    }

    Post edited by: Ron Colmen

    :

    {newTF_btn.onRelease = function ()}

    createTF(anchor_mc._x+tl.anchor_mc._width/2,anchor_mc._y,""); "

    }

    function createTF(x:Number,y:Number,s:String):Void {}

    for (var s:String in tl) {}

    {if (TL [s]. TF)}

    If (. tl [s] tf.text == "Type here") {}

    TL [s] .removeMovieClip ();

    }

    }

    }

    var tfNum_mc:MovieClip = tl.attachMovie ("tfID", "tfNum_mc_", tl.getNextHighestDepth ());

    s = tfNum_mc.tf.text;

    tfNum_mc.tf.border = true;

    tfNum_mc.tf.background = true;

    tfNum_mc.tf.backgroundColor = 0xffffff;

    tfNum_mc.tf.text = "Type here";

    }

    }

    Post edited by: Ron Colmen

  • How to calculate the height of a dynamic container

    Hi, I'm trying to find a way to calculate the height of a container after the addition of a child, but before the end of the loading of the application. Is this possible? I wanted to add data to certain objects, until they reach a certain height and then start adding them to another.

    I understand that in flex DisplayObjects, or whatever, are not fully initialized until all their children have initialized and pulled their creationComplete event. This behavior may be overloaded? I tried to change the creationPolicy on all my containers to 'ALL', but there is nothing. All variables in the height of my container (height, measuredHeight or explicitHeight) are all 0 or NaN. (But I must say that the measuredHeight on rare occasion variable displays the right height in the debugger.)

    "nickname118" wrote in message
    News:ghk31l$Sue$1@forums. Macromedia.com...
    > I am trying to find a way to calculate the height of a container
    > after the addition of a child, but before the end of the loading of the application.
    > Is
    > possible? I wanted to add data to certain objects, until they reach a
    > some height and then start adding them to another.

    Child1.getExplicitOrMeasuredHeight () + child2.getExplicitorMeasuredHeight...

Maybe you are looking for

  • NB200-12N - who to upgrade to 2 GB of RAM?

    Hello I have a NB200-12N and want to upgrade to 2 GB. The manual and the data sheet are conflicting:-On a single page, we read DDR2 800 MHz-an other PC2-4200-and then this bus 667 MHz. All three correspond to different types of RAM. What is the good?

  • Top of page Desktop problems.

    I am such a fool.  I messed up my counter top.  I accidentally moved my Start menu and my taskbar on my desk.  My icon start used to be on the left side, now it's at the top right.  Taskbar used to be in the lower right corner, now it is on the right

  • Suddenly can't get images to open in my emails?

    I have Windows Vista Home Premium, service Pack2, Internet Explorer 8. The last three weeks I suddenly had problems to open emails from people I know who are trying to send me some photos. It takes forever to load first, and then I get this message:

  • WebKit-user-select: no

    Long-pressing an item with - webkit-user-select: none displays a tear, which remains the navigation and recharge until browser or app is closed. This worked in 10.0, but seems to have regressed in 10.2.0.1767. Example: http://innovatology.nl/clients/

  • Help with VLOOKUP!

    Hi all, I hope one of you can help as done my nut! I have the following formula in cell H26. = VLOOKUP(G25,mattress,2,False) * G26 The problem is that when there is nothing in the cell G25 then "-" appears. I need to be zero as the default value. Is