How to pass one row of a result set to a cffunction?

I can pass the entire result set of a query to a cffunction,
but the function only needs one row.
The code below is a syntax error, where "3" is array index
notation for the third row of the result set.
What is the correct way to pass one row of a result set to a
cffunction?
Thank you.

iirc, cf does not allow one to reference and access a row of
a resultset
like that.
you will have to create a structure/array that holds the data
from
specific query row and pass that to your function. looping
over
queryname.columnlist list will make it easier and not
specific to any
particular query. make it into another function that accepts
a query and
row number as arguments and returns a struct/array of that
row data (or
automatically passes it to another function).
sample code for creating a structure of specific query row
data:
<cfset rowstruct = {}>
<cfloop list="#queryname.columnlist#" index="col">
<cfset rowstruct[col] = queryname[col][somerownumber]>
</cfloop>
<cfdump var="#rowstruct#">
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/

Similar Messages

  • How to exclude the XML declaration from each row of the result set?

    Hi,
    I have a table with an XMLTYPE column and would like to SELECT a set of rows. How can I exclude the XML declaration from each row in the result set? My query currently looks like this, I'm executing it through Spring JDBC:
    SELECT XMLSerialize(CONTENT t1.xmltext) FROM myschema.event t1 WHERE XMLEXISTS('$e/Event' PASSING XMLTEXT AS "e") ORDER BY t1.time DESC
    After selecting, in my application I convert each row into a String and concatenate all rows into one big string in order to parse it into a DOM model. I get a parser exception (org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed) because there are multiple XML declarations in my big string. Of course, I could manually check the String of each row whether it starts with the XML declaration, but it would be nicer if I could instruct the DB not to add it in the first place. Is there a way?
    Thanks!
    -- Daniela

    Hi,
    A couple of options I can think of :
    SELECT XMLSerialize(CONTENT
    XMLtransform(t1.xmltext,
      xmltype('<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output omit-xml-declaration="yes"/> 
    <xsl:template match="/"><xsl:copy-of select="*"/></xsl:template>
    </xsl:stylesheet>')
    FROM myschema.event t1
    WHERE XMLEXISTS('$e/Event' PASSING XMLTEXT AS "e")
    ORDER BY t1.time DESC
    ;or simply,
    SELECT XMLSerialize(CONTENT
      extract(t1.xmltext,'/')
    FROM myschema.event t1
    WHERE XMLEXISTS('$e/Event' PASSING XMLTEXT AS "e")
    ORDER BY t1.time DESC
    ;

  • How to update one row in AdvancedDataGrid

    My App have a AdvancedDataGrid and it has so much rows. Some
    data rows for AdvancedDataGrid has changed and i don't want to
    update all rows ... But i don't know how to update one row for my
    AdvancedDataGrid
    Some body help me ...
    Thanks so muchs !

    thanks ntsii.
    my problem is:
    [Bindable]
    var dp:ArrayColection = new ArrayColection({...});
    <mx:AdvancedDataGrid dataProvider="{dp}">
    <mx:groupedColumns>
    </mx:groupedColumns>
    </mx:AdvancedDataGrid>
    //==================================
    in my dp have more rows and some time one of them is changed
    then i guess the AdvancedDataGrid must build all rows when
    it's dataProvider (dp) have changed.
    And i don't want to that...
    But i am not sure the AdvancedDataGrid buld all rows from
    begin to end ... i don't know.. !

  • State machine custom task workflow how to pass one task field value to the next task field

    i am using ItemMetadata.xml to pass value from list to custom task first value its passing the but second value is showing as null
    plus how to pass one custom task value to the next custom task
    i.e one supervisor approver comments submitted field i want to see on department manager approval custom task which is the next approver from supervisor
    ows_firstfield=""
    ows_SecondField=""
    the above ows fields are from list
    in this i am unable to retrive the second value in the task form this is my first query?
    second query is that how can we pass one task field value to next approver task field value?
    any idea
    MCTS,ITIL

    What type of workflow is this?  IS this Visual Studio or SharePOint designer or third party (K2, Nintex, etc...)?  YOu should be able to get ahold of the task that was edited via the correlation token, and then grab any value you want from that
    task (wether it be a custom field or a standard worfklow task field). 
    It would help to know what you are using to build the workflow.
    Thanks!

  • How to add a dummy row in the result set of a SELECT statement.

    Hello Everyone -
    I have requirment to add a dummy row in the result set of a SELECT statement.
    For e.g. lets say there is a table Payment having following colums:
    Payment_id number
    status varchar2(10)
    amount number
    payment_date date
    so here is the data :-
    Payment_id Status Amount payment_date
    1 Applied 100 12/07/2008
    2 Reversed 200 01/ 06/2009
    3 Applied 300 01/ 07/2009
    Here is my SQL
    Select * form payment where payment_date >= 01/01/2009
    Output will be
    2 Reversed 200 01/ 06/2009
    3 Applied 300 01/ 07/2009
    My desired output is below
    2 Reversed 200 01/ 06/2009
    3 Applied 300 01/ 07/2009
    2 Reversed -200 01/ 06/2009 ------(Dummy Row)
    Thrid row here is the dummy row which I want to add when status is "Reversed"
    I would be very thankful for any kind of help in this regard ...
    Thanks,
    Gaurav

    Cartesion joining against a dummy table is a useful method of creating a dummy row:
    with my_tab as (select 1 cust_id, 1 Payment_id, 'Applied' Status, 100 Amount, to_date('12/07/2008', 'mm/dd/yyyy') payment_date from dual union all
                    select 1 cust_id, 2 Payment_id, 'Reversed' Status, 200 Amount, to_date('01/06/2009', 'mm/dd/yyyy') payment_date from dual union all
                    select 1 cust_id, 3 Payment_id, 'Applied' Status, 300 Amount, to_date('01/06/2009', 'mm/dd/yyyy') payment_date from dual union all
                    select 2 cust_id, 1 Payment_id, 'Applied' Status, 100 Amount, to_date('12/07/2008', 'mm/dd/yyyy') payment_date from dual union all
                    select 2 cust_id, 2 Payment_id, 'Reversed' Status, 200 Amount, to_date('01/05/2009', 'mm/dd/yyyy') payment_date from dual union all
                    select 2 cust_id, 3 Payment_id, 'Applied' Status, 300 Amount, to_date('01/06/2009', 'mm/dd/yyyy') payment_date from dual union all
                    select 2 cust_id, 4 Payment_id, 'Reversed' Status, -400 Amount, to_date('01/06/2009', 'mm/dd/yyyy') payment_date from dual union all
                    select 2 cust_id, 5 Payment_id, 'Applied' Status, 500 Amount, to_date('01/07/2009', 'mm/dd/yyyy') payment_date from dual),
                    --- end of mimicking your table
          dummy as (select 'Reversed' col1, 1 rn from dual union all
                    select 'Reversed' col1, 2 rn from dual)
    select mt.cust_id,
           mt.payment_id,
           mt.status,
           decode(dummy.rn, 2, -1*mt.amount, mt.amount) amount,
           mt.payment_date
    from   my_tab mt,
           dummy
    where  mt.status = dummy.col1 (+)
    order by mt.cust_id, mt.payment_id, dummy.rn nulls first;
    CUST_ID     PAYMENT_ID     STATUS     AMOUNT     PAYMENT_DATE
    1     1     Applied     100     07/12/2008
    1     2     Reversed     200     06/01/2009
    1     2     Reversed     -200     06/01/2009
    1     3     Applied     300     06/01/2009
    2     1     Applied     100     07/12/2008
    2     2     Reversed     200     05/01/2009
    2     2     Reversed     -200     05/01/2009
    2     3     Applied     300     06/01/2009
    2     4     Reversed     -400     06/01/2009
    2     4     Reversed     400     06/01/2009
    2     5     Applied     500     07/01/2009Edited by: Boneist on 07-Jan-2009 23:10
    NB. You may have to mess around with the ordering if that's not come back in the order you wanted. You didn't mention what the rules were for any expected ordering though, so I've made up my own *{;-)
    Also, I added an identifier (cust_id) to differentiate between different sets of payments, since that's usually the case. Remove that if it's not applicable for your case.

  • Getting the first row of a result set

    I need to get the first row returned from a select query that looks like this:
    SELECT DISTINCT parm1 FROM table1 WHERE parm1 > 10 ORDER BY parm1
    Can someone please show me how to do this?
    Alex

    Because you're only getting one row you don't need to bother with a DISTINCT clause. You'll need to order your data first and then nab the first row from that result set.
    SELECT parm1
      FROM (SELECT   parm1
                FROM table1
               WHERE parm1 > 10
            ORDER BY parm1)
    WHERE ROWNUM <= 1;

  • How to iterate the webservice Data control result set?

    Hi all,
    How to iterate the webservice Data control result set? I have an jsff page where I am displaying the single UserDetails by webservice DataContol. As per my design requirement I should iterate the DataControl resultSet to get the user details and push the same in to Managed bean. Please help me how to do this, any sample code please to iterate the resultset and get the data from it.
       <?xml version='1.0' encoding='UTF-8'?>
       <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:c="http://java.sun.com/jsp/jstl/core">
       <c:set var="uiBundle" value="#{adfBundle['edu.syr.oim.uiBundle']}"/>
       <af:pageTemplate viewId="/templates/jsffTemplate.jspx">
        <f:facet name="fTop"/>
        <f:facet name="fCenter">
          <af:panelGroupLayout layout="scroll" inlineStyle="width:100.0%;">
       <af:panelTabbed id="pt1">
        <af:showDetailItem text="#{uiBundle.PRIVACYFLAGS}" id="sdi4">
                <af:panelGroupLayout id="pgl4" layout="scroll">
                  <af:spacer width="10" height="10" id="s3"/>
                  <af:panelFormLayout id="pfl6">
                    <af:panelLabelAndMessage label="#{uiBundle.STUDENTEMAIL}"
                                             id="plam35">
                      <af:outputText value="#{bindings.stuEmail.inputValue}"
                                     id="ot42"/>
                    </af:panelLabelAndMessage>
                    <af:panelLabelAndMessage label="#{uiBundle.STUDENTHOMEADDRESS}"
                                             id="plam39">
                      <af:outputText value="#{bindings.stuPermAddr.inputValue}"
                                     id="ot35"/>
                    </af:panelLabelAndMessage>
                    <af:panelLabelAndMessage label="#{uiBundle.STUDENTHOMEPHONE}"
                                             id="plam40">
                      <af:outputText value="#{bindings.stuPermPhn.inputValue}"
                                     id="ot37"/>
                    </af:panelLabelAndMessage>
                    <af:panelLabelAndMessage label="#{uiBundle.STUDENTCURRENTPHONE}"
                                             id="plam42">
                      <af:outputText value="#{bindings.stuCurrAddr.inputValue}"
                                     id="ot40"/>
                    </af:panelLabelAndMessage>
                    <af:panelLabelAndMessage label="#{uiBundle.STUDENTCURRENTPHONE}"
                                             id="plam36">
                      <af:outputText value="#{bindings.stuCurrPhn.inputValue}"
                                     id="ot38"/>
                    </af:panelLabelAndMessage>
                    <af:panelLabelAndMessage label="#{uiBundle.STUDENTACAINFO}"
                                             id="plam41">
                      <af:outputText value="#{bindings.stuAcad.inputValue}"
                                     id="ot36"/>
                    </af:panelLabelAndMessage>
                    <af:panelLabelAndMessage label="#{uiBundle.EMPHOMEADDRESS}"
                                             id="plam38">
                      <af:outputText value="#{bindings.empPermAddr.inputValue}"
                                     id="ot39"/>
                    </af:panelLabelAndMessage>
                    <af:panelLabelAndMessage label="#{uiBundle.EMPHOMEPHONE}"
                                             id="plam37">
                      <af:outputText value="#{bindings.empPermPhn.inputValue}"
                                     id="ot41"/>
                    </af:panelLabelAndMessage>
                  </af:panelFormLayout>
                </af:panelGroupLayout>
              </af:showDetailItem>
       </af:panelTabbed> Above is my jsff code. Here how/where to add the phase listener to paopulate the managed bean while page render. Do I need to iterate the DC to get and push the each parameter in to ManagedBean or is there any easy way to do this by EL mapping directly at jsff. Please clarify.
    Thanks
    kln

    That is what exactly I am trying right now. I am binding each of my page fragment outputText item in to backing bean and by that way trying to populate the values.
    But the issue here is, the backing bean method doesn't getting any value until I hit any of the link or the button in the fragment. While loading the page the bean set and get is null. If i hit any link or button it is filled up with the vaule. As per my design, I would like to populate the bean method along with page load before any user action. But cant able to do this!! :(
    Below is my sample code what I am trying right now
            <af:panelLabelAndMessage label="#{uiBundle.NETID}" id="plam13">
                      <af:outputText value="#{bindings.netid.inputValue}" id="ot4" binding="#{UserDataBean.netId}"/>
           </af:panelLabelAndMessage>
    backing bean ex:
    private RichOutputText netId;
    static String netidVal;
        public void setNetId(RichOutputText netId) {
           netidVal= netId.getValue() == null? "":netId.getValue().toString();
           this.netId = netId;
        public RichOutputText getNetId() {
           return netId;
        public String getNetIdVal() {
           return netidVal;
        }Thanks
    kln

  • Getting specific row of the result set.

    table: employee
    empno           number(20)
    ssan           varchar2(9)
    date_time_stamp date
    My Sql gets all the empno where ssan and date_time_stamp are equal.
    However I need previous row from max(empno) where ssan & date_time_stamp are equal.
    For eg:
    empno     ssan           date_time_stamp
    100     123456789     01-FEB-2004
    101     000000000     02-FEB-2004
    102     123456789     01-FEB-2004
    103     123456789     01-FEB-2004
    105     123456789     01-FEB-2004
    I need row with empno = 103.
    My current sql fetches all rows for particular ssan where ssan and date time stamp are equal that fetches all empno for particular ssan and date time stamp. I want the max(empno) -1 (previous row of the result set).
    Here is my sql:
    select empno,ssan,date_time_stamp
    from employee e
    where date_time_stamp in (select date_time_stamp from employee where e.ssan = ssan)
    order by empno,ssan;
    The above sql will fetch
    empno     ssan           date_time_stamp
    100     123456789     01-FEB-2004
    102     123456789     01-FEB-2004
    103     123456789     01-FEB-2004 ---&gt; I need this row, previous row from max(empno) where ssan and date time
    stamp are matching.
    105     123456789     01-FEB-2004
    101     000000000     02-FEB-2004

    If I understand correctly, you want the second highest empno for each unique combination of ssan and date_time_stamp. If so, given
    SQL> SELECT * FROM employee;
         EMPNO SSAN      DATE_TIME_S
           102 123456789 01-feb-2004
           103 123456789 01-feb-2004
           105 123456789 01-feb-2004
           100 123456678 01-feb-2004
           102 123456678 01-feb-2004
           103 123456678 01-feb-2004
           101 000000000 02-feb-2004
           105 123456678 01-feb-2004
           100 123456678 02-feb-2004
           102 123456678 02-feb-2004
           103 123456678 02-feb-2004
           105 123456678 02-feb-2004
           100 123456789 01-feb-2004Then something like this should do it.
    SQL> SELECT empno,ssan,date_time_stamp
      2  FROM (SELECT empno,ssan,date_time_stamp,
      3               RANK() OVER (PARTITION BY ssan,date_time_stamp
      4                            ORDER BY empno DESC) rk
      5        FROM employee)
      6* WHERE rk = 2;
         EMPNO SSAN      DATE_TIME_S
           103 123456678 01-feb-2004
           103 123456678 02-feb-2004
           103 123456789 01-feb-2004HTH
    John

  • How to select one row in a table with radio button

    Hi all.
    I have a VO where there is an attribute (isDefault [String]) that identifies the default record in the view. The possible values are 'Y' for yes and 'N' for no. Obviously only one record can have the 'Y' value.
    In my page I have created an ADF Table (with the usual data control drag & drop). I would to transform the default inputText of "isDefault" field with a selectOneRadio component in order to permit the user to select (and save contextually in the DB) the default row of this table.
    Can you explain me how? I'm using JDeveloper 11.1.1.4.
    Thanks in advance.
    Baduel

    Baduel wrote:
    Cvele,
    thanks for your responses. Yes, it's easier to use af:selectBooleanCheckbox but I need that the selection is mutually exclusive (only one row can be selected). >If this is possible also with the boolean checkbox please tell me how.- Let's try with CheckBox :
    1. At the ViewObjectImpl level (for example, YourViewObjectImpl), add the following code:
      private oracle.jbo.Key currSelectedRowKey = null;
      public void doRowSelection(Key newKey) {
          // de-select old one
          if (currSelectedRowKey != null) {
              Row[] rows = findByKey(currSelectedRowKey,  1);
              if (rows != null && rows.length > 0)
                   rows[0].setStatusAsBoolean(Boolean.FALSE); // cast to the appropriate row Impl class if need !
         // remember a new selected row key:
        currSelectedRowKey = newKey;
      }In the ViewRowImpl, in the transient attr settter, do as follows:
      public void setStatusAsBoolean(Boolean value) {
         setStatus(value.booleanValue() ? ONE : ZERO);
         if (value.booleanValue()) {
             YourViewObjectImpl vo = (YourViewObjectImpl)getViewObject();
             vo.doRowSelection(getKey());
       }   P.S. The above was not tested at all, but should give you an idea

  • How just return one row of a one to many join..

    So I have a one to many join where the SMOPERATOR table has data I need however it has a couple of rows that match the JOIN condition in there. I just need to return one row. I think this can be accomplished with a subquery in the join however have not been able to come up with the right syntax to do so.
    So:
    SELECT "NUMBER" as danumber,
    NAME,
    SMINCREQ.ASSIGNMENT,
    SMOPERATOR.PRIMARY_ASSIGNMENT_GROUP,
    SMOPERATOR.WDMANAGERNAME,
    SMINCREQ.owner_manager_name,
    SMINCREQ.subcategory, TO_DATE('01-'||TO_CHAR(open_time,'MM-YYYY'),'DD-MM-YYYY')MONTHSORT,
    (CASE WHEN bc_request='f' THEN 'IAIO'
    WHEN (bc_request='t' and substr(assignment,1,3)<>'MTS') THEN 'RARO'
    WHEN (bc_request='t' and substr(assignment,1,3)='MTS') THEN 'M'
    ELSE 'U' end) as type
    from SMINCREQ
    left outer join SMOPERATOR on SMINCREQ.assignment=SMOPERATOR.primary_assignment_group
    WHERE SMINCREQ.owner_manager_name=:P170_SELECTION and SMOPERATOR.wdmanagername=:P170_SELECTION
    AND open_time BETWEEN to_date(:P170_SDATEB,'DD-MON-YYYY') AND to_date(:P170_EDATEB,'DD-MON-YYYY')
    AND
    (bc_request='f' and subcategory='ACTIVATION' and related_record<>'t')
    OR
    (bc_request='f' and subcategory<>'ACTIVATION')
    OR
    (bc_request='t' and substr(assignment,1,3)<>'MTS')
    order by OPEN_TIMe

    Hi,
    This sounds like a Top-N Query , where you pick N items (N=1 in this case) off the top of an orderded list. I think you want a separate ordered list for each assignment; the analytic ROW_NUMBER function does that easily.
    Since you didn't post CREATE TABLE and INSERT statements for your sample data, I'll use tables from the scott schema to show how this is done.
    Say you have a query like this:
    SELECT       d.dname
    ,       e.empno, e.ename, e.job, e.sal
    FROM       scott.dept  d
    JOIN       scott.emp   e  ON   d.deptno = e.deptno
    ORDER BY  dname
    ;which produces this output:
    DNAME               EMPNO ENAME      JOB              SAL
    ACCOUNTING           7934 MILLER     CLERK           1300
    ACCOUNTING           7839 KING       PRESIDENT       5000
    ACCOUNTING           7782 CLARK      MANAGER         2450
    RESEARCH             7876 ADAMS      CLERK           1100
    RESEARCH             7902 FORD       ANALYST         3000
    RESEARCH             7566 JONES      MANAGER         2975
    RESEARCH             7369 SMITH      CLERK            800
    RESEARCH             7788 SCOTT      ANALYST         3000
    SALES                7521 WARD       SALESMAN        1250
    SALES                7844 TURNER     SALESMAN        1500
    SALES                7499 ALLEN      SALESMAN        1600
    SALES                7900 JAMES      CLERK            950
    SALES                7698 BLAKE      MANAGER         2850
    SALES                7654 MARTIN     SALESMAN        1250Now say you want to change the query so that it only returns one row per department, like this:
    DNAME               EMPNO ENAME      JOB              SAL
    ACCOUNTING           7782 CLARK      MANAGER         2450
    RESEARCH             7876 ADAMS      CLERK           1100
    SALES                7499 ALLEN      SALESMAN        1600where the empno, ename, job and sal columns on each row of output are all taken from the same row of scott.emp, though it doesn't really matter which row that is.
    One way to do it is to use the analytic ROW_NUMBER function to assign a sequence of unique numbers (1, 2, 3, ...) to all the rows in each department. Since each sequence startw with 1, and the numbers are unique within a department, there will be exactly one row per departement that was assigned the numebr 1, and we''ll display that row.
    Here's how to code that:
    WITH     got_r_num     AS
         SELECT     d.dname
         ,     e.empno, e.ename, e.job, e.sal
         ,     ROW_NUMBER () OVER ( PARTITION BY  d.dname
                                   ORDER BY          e.ename
                           )         AS r_num
         FROM     scott.dept  d
         JOIN     scott.emp   e  ON   d.deptno = e.deptno
    SELECT       dname
    ,       empno, ename, job, sal
    FROM       got_r_num
    WHERE       r_num     = 1
    ORDER BY  dname
    ;Notice that he sub-query got_r_num is almost the same as the original query; only it has one additional column, r_num, in the SELECT clause, and the sub-qeury does not have an ORDER BY clause. (Sub-queries almost never have an ORDER BY clause.)
    The ROW_NUMBER function must have an ORDER BY clause. In this example, I used "ORDER BY ename", meaning that, within each department, the row with the first ename (in sort order) will get r_num=1. You can use any column, or expression, or expressions in the ORDER BY clause. You muight as well use something consistent and predictable, like ename, but if you really wanted arbitrary numbering you could use a constant in the analytic ORDER BY clause, e.g. "ORDER BY NULL".

  • How to pass one sapce to char type variable

    Hi,
    There is one import parameter in rfc "zstat" with char type and length 1. I want to pass value equal to one space in this variable during execution of RFC so that it passes the condition in code where it is not initial.
    But during runtime it doesnt store value equal to one space and become initial.
    So my question is how to pass value equal to one sapce to this variable.?
    Thanks in Advance!!!
    -Harkamal

    Hi!
    If it a char type, then its initial value is a SPACE character.
    If it confuses the program and you wanted to use it another way, then use numbers (type i - integer). It's initial value is "0".
    Or try to use other flag characters, like "T" for true and "F" for false values.
    Regards
    Tamá

  • Passing one row of a query to a function

    I want to pass a query into a function one row at a time in
    the same way you could pass an array to a function one row at a
    time. I've read that queries are just CF structures under the hood
    so I believe it should be possible. I just don't know the syntax to
    reference a single query row (and all it's variables).
    I don't want to pass the whole query to the variable because
    I would like to do the looping outside the function. The idea is to
    simplify and standardize the formatting and arrangement of several
    variables (columns) in a UDF and keep the syntax to use the
    function simple. Therefore, I'd like to avoid having to do stuff
    like convert the query to an array. That would defeat the goal of
    keeping it simple.
    Thanks
    Magnus

    > myQuery.getRow(), but
    > using undocumented functions make me nervous.
    I absolutely agree, as a standard "caveat emptor" sort of
    thing. Which is
    a shame because there's a wealth of functionality "under the
    hood" which is
    far more useful than the "official" approach to things.
    To be honest, I treat the whole "that stuff is 'not
    supported'" and "it
    could change in future versions" thing with a liberal amount
    of salt.
    1) I didn't find the support from Macromedia very accessible
    in the first
    place, and have no reason to think it will be any different
    with Adobe.
    Other than in emergencies (that'd be once, in eight years), I
    have never
    used official support;
    2) I've been watching a lot of the "undocumented" stuff for a
    few versions
    (like since 6.1), and it all still works;
    3) I've had more problem with "fixes" to CFML issues breaking
    workarounds
    of the same than I have with using undocumented code.
    Obviously that's
    because I have 1000 lines of "normal" code to every line of
    "undocumented"
    code I use, but still.
    Basically when one changes version of software, there's a
    chance your code
    will stop working. It doesn't seem any more risky to me to
    use
    undocumented features than documented ones.
    Food for thought, if nothing else.
    Adam

  • How to write one row of data at a time to "Write to File"

    I am trying to write 10 parameters to the LV "Write to File". This is for just one row at a time. This happens evertime I get a failure in my test routine. I am not quite sure how to accomplish this task. If I get another failure I write one row again. I testing 4 DUTS at a time so I write this row of data to each file. I am sure it is very simple.
    Thanks
    Philip

    Assuming your 10 parameters are an numeric array with 10 elements,  use "write to spreadsheet" file with append set to true. (... and if they are scalars, built the array first ).
    LabVIEW Champion . Do more with less code and in less time .

  • How to pass all rows from a VO to PL/SQL API

    Hi,
    My requirement is to pass all the rows of a View Object (shown on Page as a Table) to PL/SQL API. I am not allowed to pass information row by row using single array (JTF_VARCHAR2_TABLE_200).
    How do we pass multidimensional information to the PL/SQL API. Any pointers to this would be welcome.
    Thanks

    Sumeet,
    sorry for delay in code snippet.
    Here is a sample code assuming you want to send 2 attributes name and desc from your VO rows.
    I wrote the code during weekend and hence i doubt its working ;)
    public oracle.sql.ARRAY getVoArray()
    Connection conn = this.tx.getJdbcConnection();
    OAViewObject vo = (OAViewObject)this.appModule.findViewObject("TestVO");
    try
    ArrayDescriptor descriptor = ArrayDescriptor.createDescriptor
    ("TABLE_OF_BELOW_ROW_TYPE"
    ,conn
    StructDescriptor voRowStructDesc = StructDescriptor.createDescriptor
    ("XXX_TO_BE_SEND_ROW_TYPE"
    ,conn
    TestVORowImpl row = null;
    String name;
         String desc;
    int fetchedRowCount = vo.getFetchedRowCount();
    STRUCT [] finalStruct = new STRUCT[fetchedRowCount];
    Object[] attrField = new Object[1];
    RowSetIterator entityIdIter1 = vo.createRowSetIterator("entityIdIter1");
    if (fetchedRowCount > 0)
    entityIdIter1.setRangeStart(0);
    entityIdIter1.setRangeSize(fetchedRowCount);
    for (int i = 0; i < fetchedRowCount; i++)
    row = (TestVORowImpl )entityIdIter1.getRowAtRangeIndex(i);
    name = (String)row.getName();
              desc = (String)row.getDesc();
    attrField[0] = (String)name;
    finalStruct[i] = new STRUCT(voRowStructDesc, conn, attrField);
    entityIdIter1.closeRowSetIterator();
    oracle.sql.ARRAY yourArray = new oracle.sql.ARRAY(descriptor, conn, finalStruct);
    return yourArray;
    return null;
    catch(java.sql.SQLException ex)
    throw OAException.wrapperException(ex);
    Let me know if you are still having issues.
    --Saroj                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to return one ROW with Multiple value seperated by Colon in a SQL Query

    Hi,
    I have a SQL query as mentioned.
    select deptno
      from deptI want to mofidfy this query, so that this should return me department list with colon delimeted in one ROW.
    10:20:30:40.......Thanks,
    Deepak

    In 10g:
    select rtrim(xmlagg(xmlparse(content deptno || ':')).getstringval(), ':') data
    from   dept;
    DATA                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
    10:20:30:40with apologies for the abuse of XML...

Maybe you are looking for

  • Difference between using app server connection pooling and using the driver

    Hi all, How to get connection pooling with out application server and tomcat also? What is the difference between using app server connection pooling and using the driver supported connection pooling? Regards, Murali

  • How to make BI Info obj Data element in-herit source DE documntn?

    Say I am in ECC. I go to SE11, give table name MARA and then doubleclick on the dataelement 'MATNR'. Then I click on documentation. I get a popup with Short text " Material Number" and Definition "Alphanumeric key uniquely identifying the material'.

  • How to add a field in Transaction LT31.

    Now I want to add a field in Transaction LT31 and store the field in a ztable, would you please tell me how to implement this? Thanks in advance!

  • Fileadapter polling help plz

    Hi evry one i am new to BPEL and i am in need of file adapter functionality. I have a folder which has files of naming convention NSD 123-222 090714T01:23:23 if i suppose i have some hundred files in that folder and i am pointing the file adapter to

  • SAP Archiving FI_DOCUMNT

    I'm trying to change the structure from SARI SAP_FI_DOC_002 and got the following error. Error in info structure SAP_FI_DOC_002 analysis program in line 412 Message no. Q6227 Diagnosis There is a syntax error in line 412 of the generated reporting pr