parametic test loops



Tags: NI Software

Similar Questions

  • Boolean latch to Stop function Test loop

    Hello!

    I'm working on a project to control a Chroma programmable AC Source model 61604 with LabVIEW, and I'm having a problem where my "Stop Test" button is not to behave exactly how I would want only it. I changed the mechanical function to a switch, which is unfortunate, because I really prefer it as a lock.

    He must penetrate several loops in many cases, so I currently use local variables that required me to change the function of the button with a switch, but I'd rather keep it as a button.

    Is it possible to enable a button closure go through several places? The event structures are usable for that without waving curls? (I found that one of my event structures back was a loop of its function so I'm a little more circumspect on them now)

    Thanks in advance,

    Anthony

    What is the problem with the help of the trigger?  Latch means it will reset after reading, thats why he is not compatible with local variables.  How does he know to expect that every local variable has been read?  And some may never be read.  You can actually do the swtich behaves like a lock if you wire a false to a local variable of this, but make sure that it runs only after all of your other loops have finished.

    You can use a notifier as a way to send a notification to each loop button is pressed.

    You can keep a structure of the event to be a holder of a loop by plugging in a zero to his node timeout.

  • parameter test conditions not

    I'm converting some infiltration in PL/SQL operations and I have a situation where
    based on the results (i.e. the returned rows) I run different code.

    So I have a v_file_name_found parameter which is set locally to the procedure.
    The procedure is placed in a file name and I search for it...
    If found I then assign it to the v_file_name_found, if
    where clause has been reached. If I get 0 rows back, I A, if I get lines > 0 then I do B.

    In oracle that I have to assign the v_file_name because everything I do is test the
    where clause conditions?

    Here is the code of the entry with a handful of oraclese that I added to the conversion...
    create or replace procedure   msg_read  (file_name in char)
    user authid
    
    v_file_name_found    char;
    
    Begin
    
     select a.file_name into v_file_name_found 
      from table One A, Table Two B
    where a.file_name = b.file_name and
    a.vol_id = vol_id;
    
    if sqlcode <> 0  then  ... do something  AAA 
    
    else
    
    if iirowcound = 0  then   do BBB 
    
    end;
    /
    Thank you for your understanding.

    Published by: BluShadow on May 16, 2011 15:11
    addition of {noformat}
    {noformat} tags and fixed the <> symbols that don't appear together on the forum.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

    Hello

    What you have is a good way to do it in Oracle.
    You must SELECT IN something, if you need a variable. If all you really want to know is whether the query found something, or not, then you can do something like this:

    CREATE OR REPLACE PROCEDURE msg_read (in_file_name IN VARCHAR2)
    AUTHID CURRENT_USER
    IS
    
         v_file_name_found     a.file_name%TYPE;
    
    BEGIN
        BEGIN
                SELECT     a.file_name
         INTO     v_file_name_found
         FROM     table_One A
         ,     Table_Two B
         WHERE     a.file_name     = b.file_name
         AND     a.vol_id          = vol_id
         AND     ROWNUM          = 1;
    
         -- Do AAA
         ...
    
        EXCEPTION
            WHEN  NO_DATA_FOUND
         THEN
             -- Do BBB
             ...
        END;    -- End of nested BEGIN block
    
        -- The following code is done in all cases (unless a real error occurred) after AAA or BBB
        ...
    END     msg_read;
    

    where catch you the error that occurs when the query returns 0 rows. However, you must always SELECT a variable, so in this case, I don't think that thie approach wins above whatever it is for you. Keep doing it the way that you thought of.

    I have not tested the code above, but I know that it is closer to the correct Oracle syntax.

    Do not use the CHAR data type. Use VARCHAR2 or, if you want to specify that a variable local is the same type and size as a column of data, using % TYPE, as I did above.

    If the filename is the name of a column, you must choose a different name for the parameter, such as file_name_given or in_file_name. This is not necessarily a mistake to use the same name, but it can be confusing.

    If a SELECT INTO statement detects more than 1 row, it triggers the TOO_MANY_ROWS error. You could test for it in the section of the EXCEPTION to a nested block, but it is easier to avoid it completely by
    (a) using ROWNUM = 1, as shown above
    (b) to rewrite the query to use aggregate functions (but no GROUP BY), or
    (c) re-writng the query as an EXISTS subquery, as in "Double WHERE EXISTS SELECT 1 (...)"

    Published by: Frank Kulash, May 16, 2011 10:18

  • How to move the Cursor parameter for loop with the type of table?

    Hi friends,
    I wonder how to pass a parameter into the second loop in the code example below. Please see the "BOLD" statements and to answer my questions.
    Thank you very much. Here's the code.

    declare
    l_bom_header_tbl BOM_BO_PUB. BOM_HEADER_TBL_TYPE; -TABLE TYPE
    V_bom_header_tbl Bom_Bo_Pub.Bom_Head_Rec_Type: = Bom_Bo_Pub.G_MISS_BOM_HEADER_REC; -Record type
    v_bom_components_tbl Bom_Bo_Pub.Bom_Comps_Tbl_Type: = Bom_Bo_Pub.G_MISS_BOM_COMPONENT_TBL; - nested table type
    c: number = 0;
    k: = 1 number;
    Start
    BOMPXINQ. () Export_BOM
    P_org_hierarchy_name = > l_org_hierarchy_name,
    P_assembly_item_name = > l_assembly_item_name,
    P_organization_code = > l_organization_code,
    P_alternate_bm_designator = > '1Test. "
    P_Costs = > l_costs,
    P_Cost_type_id = > l_cost_type_id,
    X_bom_header_tbl = > l_bom_header_tbl,
    X_bom_revisions_tbl = > l_bom_revisions_tbl,
    X_bom_components_tbl = > l_bom_components_tbl,
    X_bom_ref_designators_tbl = > l_bom_ref_designators_tbl,
    X_bom_sub_components_tbl = > l_bom_sub_components_tbl,
    X_bom_comp_ops_tbl = > l_bom_comp_ops_tbl,
    X_Err_Msg = > l_Err_Msg,
    X_Error_Code = > l_Error_Code);
    If l_Error_Code = 0 then


    because me in 1... l_bom_header_tbl. COUNTING LOOP
    V_bom_header_tbl.organization_code: = "DSC";

    Can assign us a table type of guy like below the registration statement?
    V_bom_header_tbl.assembly_item_name: is l_bom_header_tbl (i) .assembly_item_name;.

    k: = 1;

    I want to pass the l_bom_header_tbl (i) .assembly_item_name parameter in the declaration below: How do I do this?
    for j from 1... l_bom_components_tbl. COUNTING LOOP

    Can assign us a table type of type array as below the statement?
    v_bom_components_tbl (k). Assembly_Item_name: is l_bom_header_tbl (i) .assembly_item_name;.
    k: = k + 1;
    end LOOP;
    end loop;
    end;

    Published by: ILovePlSql on March 22, 2010 07:51

    Published by: ILovePlSql on March 22, 2010 08:16

    ILovePlSql wrote:
    V_bom_header_tbl emp % rowtype;

    If v_bom_header_tbl has just two fields as ename, sal then also the assignment of type table, record type work or if the record type and the array type have the same structure?

    Yes:

    SQL> declare
      2      type Bom_Head_Rec_Type is record(ename emp.ename%type,sal emp.sal%type);
      3      type BOM_HEADER_TBL_TYPE is table of Bom_Head_Rec_Type index by binary_integer;
      4      l_bom_header_tbl BOM_HEADER_TBL_TYPE;
      5      V_bom_header_tbl emp%rowtype;
      6  begin
      7      select ename,sal bulk collect into l_bom_header_tbl from emp;
      8      for i in 1 .. l_bom_header_tbl.count loop
      9        V_bom_header_tbl.ename := l_bom_header_tbl(i).ename;
     10        V_bom_header_tbl.sal := l_bom_header_tbl(i).sal;
     11      end loop;
     12  end;
     13  /
    
    PL/SQL procedure successfully completed.
    
    SQL>  
    

    SY.

  • An array of strings as function parameter in loop fails

    Hallo,

    I have a weird problem here and I hope someone can help me find the cause.

    I have a function where I said an array of strings (string_list). I pass the array to a function that does modifactions to the table. I am addressing Walker the array of strings to an index of all the values are stored correctly. When I loop through the array by incrementing the index automatically only the last index value are saved in all positions.

    Why is this? Or what I am doing wrong?

    It is the passage to another function, an array of strings
    int calling_function
    {
    char * string_list [MAX_PATHNAME_LEN]; //< store="" strings="" in="">
    function_called (string_list); passing a pointer to an array of string
    return 0;
    }

    This is the function receives a reference to an array of strings to store data
    int function_called (char * output_list [])
    {
    int i = 0; counter variable
    / * This works and good values are stored in output_list * /.
    output_list [0] = '02 ";
    output_list [1] = '12 ';
    output_list [2] = "22";
    output_list [3] = "32";
    output_list [4] = '42 ';
    output_list [5] = "52";
    output_list [6] = '622 ';
    output_list [7] = "72".

    / * This does not work and will store '31' in all places of the matrix * /.
    < 32="">
    {
    < %d »,="" i) ;="" incrémenter="" la="" valeur="">< br=""> output_list [i] = sample; < br=""> i = i ++ ; < br=""> < br="" >="">

    output_list [0] = '02 "; < br=""> output_list [1] = '12 ';< br="" >="">

    Thanks!

    Hi,.

    When you do

    output_list [i] = sample;

    all of the members of the array have the same value: sample-a char pointer. You are modifying the afterwards glad of sample purpose the previous values still point to sample.

    If you assign values to each array member like:

    you assign different values: a pointer to a string containing "02", pointing to a string contaning "12",...

    If you want to assign values in a loop you need to allocate memory for each string (output_list [i]) and copy the content of sample in them.

    Does this make sense to you?

    Constantin

  • Rate the triggered loop of the timed iterations of TTL

    Hi all

    I have a camera control VI that awaits the shutter of the camera TTL information and use it as a source of synchronization for a timed loop. In this timed loop, the camera is read and analyzed. Program should respond as soon as possible a new image and that's why I put the timed loop to "Throw missing items" so that it does not seek to catch up (events im trying to detect is quite rare and last several frames).

    The problem is this: when I put the camera for a certain numebr of frameworks (e.g. 10,000) sometimes due to discarded frames ever loop iteration number the last number of frame expected and do not remove (it remains to 9.998 for example). I noticed I can stop it by deselecting "maintain phase." However, it is clear to me what happens exactly with these settings in a situation of TTL triggered.

    It is true that the loop passes the new data directly but starts the next loop the correct number of iteration (+ 1)? Or something else happening?

    IM grateful for any help!

    Dear j.win,

    If you deselect the option 'Maintain the Original Phase', in fact you never will reject any iteration, whatever the value "Discard missed items." On the contrary, the loop will try to catch up the iterations of the end.

    Use of a source of external synchronization (for example your TTL) instead of a source of internal synchronization does not change. You can use the 'period' entrance (dt) of the loop timed to specify when the loop is supposed to go (the unit is the "ticks" in the case of an external synchronization source). A value of '1' means that test loop to iterate over all the graduations of external synchronization source. If for any reason any iteration lasts longer than that, you'll have an iteration "end". Also with a value of '1', it is not possible to change the "phase", then the parameter "Initial Phase to maintain" will be defined only weather or not ignore you the iteration. If 'Maintain initial Phase' is set to false, the loop will run immediately after an end iteration to run always, but a little of the latter. If the 'Maintain initial Phase' is true, the loop will run immediately after an iteraion end if the option 'remove point missed' is false otherwise the loop will jump the iteration.

    It's more clear now?

    Kind regards

  • Nedopil part of sequence to run once in test USE

    Hello

    I use 1 file encoding to run tests on a number of different types of products.

    Right now I use a message box to the user to select the product under test and based on the return of the message box, I select the correct limits to laod with the shipper of the property.

    My problem is that I don't want to see this message every time a device box is test using test DUT. (only on the forst to run)

    Can someone please adivse the best approach to deal with this case.

    PS: I want to stay away from change my IO, I want to enter in the case of having customized OIs for different test sequences.

    Kind regards

    Don1.

    Hello

    To try to make my suggestion:

    1. open your movie file in the editor of Teststand.

    2 Select the pull-down Edit menu, select the sequence Callbacks... file option.

    This should display a new dialog box display the available callbacks associated with the process in use template.

    3. in the new dialog box select/highlite the recall of PreUUTLoop , and select Add.

    This should add a new subsequence to your sequence called PreUUTLoop file.

    Close the new dialog box.

    4. open / select the new PreUUTLoop under sequence in your movie file.

    Insert a new type of Message Popup enter group main step, add a simple text just to try the idea.

    5. run your movie file. The simple text you entered to appear as a Message Popup dialogue

    box, just once, before entering the test loop.

    6. If it works for you, replace step Message Popup with your steps that get user information.

    Kind regards

    Gary.

  • BB Testing Simulator

    • How to effectively use the simulators?
    • What all can be tested in simulators? How do we simulate conditions? What are the problems that are likely to appear in a live environment (?)?
    • How to create a test loop? Start with a single function and a quarter to the entire application!

    the Simulator is a very precise tool.
    If you want to test usb, bluetooth and other stuff of connection, you need the real device. SMS, e-mail, gps and internet related things mostly work very well.

    by creating modular code, you can use unit tests junit standard to test things like connections, etc. parsing xml.
    There is also a j2me junit but I've never used.

    After developing for some time develop you some routines like the Simulator startup takes awhile. better put some more debug code in both, for example.

  • Hide all subforms by using a loop function

    Hello

    I have a base control that displays or hides a subform if a box has been checked or not.

    If (checkbox.rawValue == 1) {}

    This.Presence = "visible";

    }

    else {this.presence = "hidden":}

    }

    Now, this check box controls the visibility of several subforms, so I would have a function in a script object that I can call each subform calculate event.

    I named the script object "common good".  At first, I tried just an if/then statement as above, but "this" is meaningless in function.

    So I resorted to the creation of a loop.  I tried to do a test loop to hide all subforms, but it does not work.   Once I have run, I can add an if/else statement that allows to hide currentElement if the box is checked, but for simplicity I didn't at that point.

    Any tips?  I derived this loop an example for the mistakes of control loop of Niall O'donovan.

    function HideSubforms (myParentObject) {}

    Declaring variables

    var allChildElements;

    var intNumElements;

    var currentElement;

    var i;

    Get all children nodes of the parent element

    allChildElements = myParentObject.nodes;

    Total number of items in the object

    intNumElements = allChildElements.length;

    Loop through all child elements

    for (i = 0; i < intNumElements; i ++) {}

    currentElement = allChildElements.item (i);

    If (currentElement.className = "subform") {}

    currentElement.presence = 'hidden ';

    }

    }

    } / / End of the function

    You must pass the subform to root as an argument to this function.

    Common.HideSubforms (this.parent.parent);

    On my screen, I was calling this function on the initialize event of the TextField1 inside Subform2.

    I need to go (Page1) rootnode property to this function to work.

    Thank you

    Srini

  • Error when executing the parameterized tests

    Hello

    I am currently working on a parameterized TestCase really simple. I use flexunit 4.0 rc1 and flexmojos 3.5.0.

    When I do ' mvn clean test ", I get the following error:

    <testsuite errors="0" failures="1" name="com.finams.bnpflexlib.utils.StringUtilsTest" tests="1" time="0">
      <testcase name="initializationError" time="0">
        <failure message="Custom runner class org.flexunit.runners.Parameterized cannot be instantiated" type="com.finams.bnpflexlib.utils.StringUtilsTest">Error: Custom runner class org.flexunit.runners.Parameterized cannot be instantiated
         at org.flexunit.internals.runners::InitializationError()[C:\Users\dmoore\Documents\_Production\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\internals\runners\InitializationError.as:50]
         at org.flexunit.internals.builders::MetaDataBuilder/createInitializationError()[C:\Users\dmoore\Documents\_Production\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\internals\builders\MetaDataBuilder.as:209]
         at org.flexunit.internals.builders::MetaDataBuilder/buildWithSecondSignature()[C:\Users\dmoore\Documents\_Production\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\internals\builders\MetaDataBuilder.as:179]
         at org.flexunit.internals.builders::MetaDataBuilder/buildRunner()[C:\Users\dmoore\Documents\_Production\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\internals\builders\MetaDataBuilder.as:146]
         at org.flexunit.internals.builders::MetaDataBuilder/runnerForClass()[C:\Users\dmoore\Documents\_Production\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\internals\builders\MetaDataBuilder.as:115]
         at org.flexunit.runners.model::RunnerBuilderBase/safeRunnerForClass()[C:\Users\dmoore\Documents\_Production\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\runners\model\RunnerBuilderBase.as:63]
         at org.flexunit.internals.builders::AllDefaultPossibilitiesBuilder/runnerForClass()[C:\Users\dmoore\Documents\_Production\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\internals\builders\AllDefaultPossibilitiesBuilder.as:106]
         at org.flexunit.runners.model::RunnerBuilderBase/safeRunnerForClass()[C:\Users\dmoore\Documents\_Production\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\runners\model\RunnerBuilderBase.as:63]
         at org.flexunit.runners.model::RunnerBuilderBase/localRunners()[C:\Users\dmoore\Documents\_Production\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\runners\model\RunnerBuilderBase.as:119]
         at org.flexunit.runners.model::RunnerBuilderBase/runners()[C:\Users\dmoore\Documents\_Production\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\runners\model\RunnerBuilderBase.as:87]
         at org.flexunit.runners::Suite()[C:\Users\dmoore\Documents\_Production\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\runners\Suite.as:170]
         at org.flexunit.runner::Request$/classes()[C:\Users\dmoore\Documents\_Production\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\runner\Request.as:201]
         at Function/http://adobe.com/AS3/2006/builtin::apply()
         at org.flexunit.runner::FlexUnitCore/runClasses()[C:\Users\dmoore\Documents\_Production\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\runner\FlexUnitCore.as:191]
         at Function/http://adobe.com/AS3/2006/builtin::apply()
         at org.flexunit.runner::FlexUnitCore/run()[C:\Users\dmoore\Documents\_Production\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\runner\FlexUnitCore.as:171]
         at Function/http://adobe.com/AS3/2006/builtin::apply()
         at org.sonatype.flexmojos.unitestingsupport.flexunit4::FlexUnit4Listener/run()[/home/nexus/flexmojos/trunk/target/checkout/flexmojos-testing/flexmojos-unittest-flexunit4/src/main/flex/org/sonatype/flexmojos/unitestingsupport/flexunit4/FlexUnit4Listener.as:42]
         at org.sonatype.flexmojos.unitestingsupport::SocketReporter/runTests()[/home/nexus/flexmojos/trunk/target/checkout/flexmojos-testing/flexmojos-unittest-support/src/main/flex/org/sonatype/flexmojos/unitestingsupport/SocketReporter.as:243]
         at org.sonatype.flexmojos.unitestingsupport::TestApplication/runTests()[/home/nexus/flexmojos/trunk/target/checkout/flexmojos-testing/flexmojos-unittest-support/src/main/flex/org/sonatype/flexmojos/unitestingsupport/TestApplication.as:40]
         at flash.events::EventDispatcher/dispatchEventFunction()
         at flash.events::EventDispatcher/dispatchEvent()
         at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9298]
         at mx.core::UIComponent/set initialized()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:1169]
         at mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:718]
         at Function/http://adobe.com/AS3/2006/builtin::apply()
         at mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8628]
         at mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8568]</failure>
      </testcase>
    </testsuite>
    

    Here is my unit test (StringUtils is a simple class with a single method that converts numbers to strings, I did to handle the special case of a NaN parameter):

    package com.finams.bnpflexlib.utils
    {
         import org.flexunit.Assert;
         import org.flexunit.runners.Parameterized;
         import com.finams.bnpflexlib.utils.StringUtils;
         
         [RunWith("org.flexunit.runners.Parameterized")]
         public class StringUtilsTest
         {
              [Datapoints]
              static public var referential:Array = [
                   {numeric: 0, alpha: '0'},
                   {numeric: 1500, alpha: '1500'},
                   {numeric: 42, alpha: '42'},
                   {numeric: 15.15, alpha: '15.15'},
                   {numeric: 999, alpha: '999'},
                   {numeric: 17.0123456789, alpha: '17.0123456789'},
                   {numeric: 123456789, alpha: '123456789'},
                   {numeric: 0.00000000001, alpha: '0.00000000001'},
                   {numeric: -1, alpha: '-1'},
                   {numeric: 0.00000000015, alpha: '0.00000000015'},
                   {numeric: -1.01, alpha: '-1.01'},
                   {numeric: 0.12345678912, alpha: '0.12345678912'},
                   {numeric: -123456789, alpha: '-123456789'},
                   {numeric: 0.0, alpha: '0.0'},
                   {numeric: -1.123456789, alpha: '-1.123456789'},
                   {numeric: -0.0, alpha: '-0.0'}
              ];
              
              public function StringUtilsTest() {}
    
              [Test(description="Ensure that a NaN number will produce an empty string.")]
              public function checkNbToStringWithNaNParameter():void
              {
                   var result:String;
                   
                   result = StringUtils.nbToString(NaN);
                   
                   Assert.assertEquals(result, '');
              }
              
              [Ignore]
              [Test(dataprovider="referential", description="Check conversion with a set of values")]
              public function checkNumbers(nb:Number, ref:String):void
              {
                   var result:String;
                   
                   result = StringUtils.nbToString(nb);
                   
                   Assert.assertEquals('Conversion fault: expected ' + ref + ', got ' + nb.toString(),
                                  result,
                                  'ref');
              }
         }
    }
    

    I wonder what the problem...

    the release of point zero of flexunit have parameter tests, only versions a dowry. so using the CFC that you mention in your installation will fail. I am also afraid that your error messages post shows a name developers... dmoore... This means that it is not a release somehow. Iall commercial versions are built from our server. somewhere, you found a really old development lib and not an approved version

    You can try to get a version of builds.flexunit.org

    Mike

  • Loop sound!

    How did you hear music constantly 'loop '.
    Thank you all
    Max
    This my code:
    var snd:Sound = new Sound();
    SND. Load (new URLRequest ("1.mp3"));
    var soundCHNL:SoundChannel = new SoundChannel();
    soundCHNL = snd.play ();
    var soundTrans:SoundTransform = new SoundTransform();

    soundTrans.volume = 0.5;
    soundCHNL.soundTransform = soundTrans;
    //////////////////////////////////////////////////////////
    Thank you
    Max

    the play() method has a parameter for loop:

    var snd:Sound = new Sound();
    SND. Load (new URLRequest ("1.mp3"));

    var soundCHNL:SoundChannel = new SoundChannel();
    soundCHNL = snd.play (0,1000);

    var soundTrans:SoundTransform = new SoundTransform();
    soundTrans.volume = 0.5;

    soundCHNL.soundTransform = soundTrans;

  • Cursor for loop and IN LOOP

    Hi gurus,

    I'm going to the table like this:

    TEST
    NO      PK
    VALUE
    And I wrote a test cursor procedure to retrieve values such as:
    CREATE OR REPLACE
    PROCEDURE test_proc_cursor
      (
        p_no OUT test.no%TYPE,
        p_value OUT test.value%TYPE)
    AS
      CURSOR proc_cursor
      IS
         SELECT no,value INTO p_no, p_value FROM test;
    BEGIN
      OPEN proc_cursor;
      LOOP
        FETCH proc_cursor INTO p_no, p_value;
        EXIT
      WHEN proc_cursor%NOTFOUND;
        dbms_output.put_line(p_no||'       '|| p_value);
      END LOOP;
      CLOSE proc_cursor;
    END test_proc_cursor;
    But, my question is, I have used the simple LOOP in the cursor. Anyone can write the same logic of cursor with all IN LOOP and LOOP FOR it please

    Thank you

    Published by: user10679113 on January 22, 2009 07:53

    Published by: user10679113 on January 22, 2009 07:54

    Published by: user10679113 on January 22, 2009 07:55

    Hello

    SQL> DECLARE
      2    p_no    test.no%TYPE;
      3    p_value test.value%TYPE;
      4    CURSOR proc_cursor IS SELECT no,value FROM test;
      5  BEGIN
      6    OPEN proc_cursor;
      7    FETCH proc_cursor INTO p_no, p_value;
      8    WHILE proc_cursor%FOUND LOOP
      9      dbms_output.put_line(p_no||'       '|| p_value);
     10      FETCH proc_cursor INTO p_no, p_value;
     11    END LOOP;
     12    CLOSE proc_cursor;
     13  END;
     14  /
    1       awe
    2       JHKBHNJ
    3       548539
    
    PL/SQL procedure successfully completed.
    
    SQL> DECLARE
      2    CURSOR proc_cursor IS SELECT no,value FROM test;
      3  BEGIN
      4    FOR cRec IN proc_cursor LOOP
      5      dbms_output.put_line(cRec.no||'       '|| cRec.value);
      6    END LOOP;
      7  END;
      8  /
    1       awe
    2       JHKBHNJ
    3       548539
    
    PL/SQL procedure successfully completed.
    
    SQL> BEGIN
      2    FOR cRec IN (SELECT no,value FROM test) LOOP
      3      dbms_output.put_line(cRec.no||'       '|| cRec.value);
      4    END LOOP;
      5  END;
      6  /
    1       awe
    2       JHKBHNJ
    3       548539
    
    PL/SQL procedure successfully completed.
    

    Kind regards
    Dima

  • HP 3105 m Notebook: how long it has a battery last on this model?

    The comments seem to claim that this laptop (HP 3105 m) will last up to 8.5 hours on an automatic battery flow test.

    Apparently using WiFi, by opening a Web site using the default browser, wait 30 seconds, close the browser.  Wait 30 seconds, open another site etc.  The test loop uses 50 different Web site, and then starts over.  Runs until the computer into hibernation because of the low battery power.

    According to the HP Wizard my battery is shaped like "perfect".  Yet, I am averaging maybe 4 hours for a dead battery.

    Is there a publicly accessiable battery of test which is exactly similar to that above?  Or is it still reasonable to assume that this machine will get up to 8.5 hours on a battery?

    Tom

    Hüffer wrote:

    You say Laptop magazine in its review of your laptop said they got 8.5 hours out of the battery using 'their' test and you get only about 4. You do understand that the Laptop magazine is a shill for the industry, right? 4 hours is very good. Based on the reviews that I have seen that you get both a battery life because it can give.

    You ask that all portable magazines are "shills" or one only?  I found a number of them to be fairly reliable in all. And they were citing a specific enough test that could be transposed.

    I will admit, both of my books seem to have reached the level of 4 hours.  I also have a Chromebook which has been reported to run up to 10-12 hours and he runs up to 10-12 hours.

    Oh well, sold a book and playing with each other.  Thank you for your time.

    Tom

  • Pavilion g6-2304au: calibration of the battery

    Salvation is my laptop for 1 1/2 years old and just bought a new battery. A connected for about 6 hours then put on the market. A battery has checked with hp support assistant who said battery was in need of calibration. Then turned off, turns back on and press the ESC key. You press F2, then doesn't have battery checked by there who says also required calibration. If you click on calibrate, who asked for cord AC in which I did. It was at 23:00 Went to bed, woke up at 3:30 and it made all the checks hard drive. All had passed, but he still worked long dst end of hard disk checking. Calibration of the battery said 20% discharge. Check again at 08:00 and it was being tested, while the battery calibration said 0%.

    Power cord is remained plugged all the time because I never seen a screen saying the device. Now I unplugged it and the % is on the rise and test was not yet finished. Is this OK or something went wrong?

    Hello

    The captain had to be disconnected after fully charging the battery, then access the system BIOS test - loop until that error, then reload again in full, finally repeat test battery.

    Read the battery calibration manually section in this document:
    http://support.HP.com/us-en/document/c03325217

    Concerning

    Visruth

  • Set a variable in an expression of post

    I have a test loop and if one or several tests fail, I want to set a variable 'fail', that I can use at the end of the loop to a sheet of summary data.

    In pseudocode, I want:

    If step.result.status == 'failure '.

    then failure = 1

    There is no further action so the? : operator does not seem appropriate, but I don't see any option IF. So should I write something like:

    (step.result.status is "Failed")? (locals.failure = 1): (locals.failure = locals.failure)

    ?

    Thank you

    JVH


Maybe you are looking for

  • display a sequence with debugging

    Hello I have a solution of standard test like most of yours, a main sequence and a lot of subsequence. When running single pass in debug mode. the 'single pass' window will show the current sequence or the sous-séquence. My question is I don't like t

  • analog output digital start trigger the api c

    Hi, I'm trying to start analogue output based on a digital trigger (either PFIO or a PXI line) I can make this easy in LabVIEW.  However with the C API (through the Python wrappers), the problem is when I call DAQmxBaseWriteAnalogF64, writing will al

  • HP Envy M6-1105dx: help of trade-in value?

    Hello First of all, I am a user of HP of LONG date and with the experience I've had so far, I would stay like that, although recently it seems very difficult to navigate in the website of hp for technical support sales etc.... None of them are linked

  • HP pavilion a6010e forgotten password HELP

    I forgot my admin password for my HP Pavilion a6010e PC. They gave me this computer by my grandmother, who passed away so I have nothing else then the computer. Help, please!

  • ASA Cisco VPN remote access

    Hi guys I have a few questions regarding vpn and vpn traffic record remote access. Please can someone advise how I can capture traffic decrypted for client vpn for remote access on the firewall. now, firewall has any source any dest and list of servi