Exporting and returning value question

What is different between exporting and returning value in method of a class. if created an object inside the method and exporting it, it means I have a reference to that object inside program. If I use returning value, it means I have a copy of object created inside the method, but the object inside method is destroyed after it ends. Do I understand correctly? if so what do u prefer exporting or returning value? thanks!

Hello Anthony
The major difference is that you can have multiple EXPORTING parameters yet only a single RETURNING parameter. In addition, if you have a RETURNING parameter you cannot have EXPORTING parameters simultaneously.
Defining methods with a single RETURNING parameter is more Java-like than having multiple EXPORTING parameters.
Whenever possible and sensible I prefer RETURNING parameters over EXPORTING parameters because they allow to use the function method call, e.g.:
go_msglist = cf_reca_messagelist_create( ).
Regards
  Uwe

Similar Messages

  • Display and return value in select list.

    hi,
    i want to display the value in select list coming from this quary .
    select student_id from class_record where class_id =:p1_class_id and SECTION =:p1_section
    minus
    select student_id from STUDENT_TYPE_DETAILS where class_id =:p1_class_id and SECTION =:p1_section;
    but i want f_name and last name with student_id .f_name and l_name store in table s_per_det.student is also in that table.
    how can i define display value and return value in this quary using 3rd table s_per_det.
    How can i do this.
    Thanks
    manoj

    Ooh, MINUS.... Can you not use a NOT EXISTS in this case, could have a big effect on the execution plan?
    Something like this perhaps?
    SELECT f_name||' '||l_name,
           stundent_id
    FROM class_record a,
         s_per_det b
    WHERE a.student_id = b.student_id
    AND   a.class_id   = :P1_CLASS_ID
    AND   a.section    = :P1_SECTION
    AND   NOT EXISTS(SELECT 'X'
                     FROM student_type_details c
                     WHERE a.student_id = c.student_id
                     AND   c.class_id = :P1_CLASS_ID
                     AND   c.section = :P1_SECTION)Cheers
    Ben
    http://www.munkyben.wordpress.com
    Don't forget to mark replies helpful or correct ;)

  • Urgent! Display lookup value and return value at the same time.

    We are using pop up lov.
    How can we display lookup value and return value at the same time. let me claer..
    Our lov query is like fallowing
    select dname, deptno from dept
    we want to return deptno column into a database bind text item and dname column into a display item (look up)
    can we do it (we need to do)
    thanks for your help.

    We did it .
    But pop up key lov (display description return value ) property doesn't appear for tabular forms item.
    (Report Attributes pages Tabular Form Element section display As property list)
    can we set or not.
    Thank you.

  • Getters Methods - Exporting vs Returning value()

    Hi OO Gurus,
    i'm doing a test oo report. On its first version, i declared all data objects in the public section of all classes. Now, i moved all data objects to the private sections for encapsulation purposes. Therefore, i have to implement get methods for everything declared (including tables and references) in the report. My question is:
    What is the best option to create get methods: Create simple methods using the "Exporting" keyword or create functional methods using "Returning value" keywords?
    If i use 'exporting', i'm just able to call the method using 'call method' keywords. However formal parameter may not be fully specified (i can export tables in such method)
    If i use 'returning value', i have a functional method but its parameters must be fully specified.
    What's is the best option in your opinion?
    Thanks!

    In my opinion functional method is better choice, for the following reasons:
    - can be used inline (i.e. as an operand of IF...ENDIF block)
    - you don't have to worry about initializing returning parameters, this is done in each method call. For exporting parameter you have to be very carefull, as they might be already passed to the method with some data in them. Althought it not recommended, it is doable, so before you call such method you have to pay atention to that.
    If i use 'exporting', i'm just able to call the method using 'call method' keywords.
    This is untrue. You can call it like
    ref->method( exporting ....
                          changing .... ).
    So the same way as you would call functional method, but you MUST determine whether is exporting/changing/imporitng parameter unless there are only importing parameters. In this case you can even skip the input/output signature.
    If i use 'returning value', i have a functional method but its parameters must be fully specified.
    Not sure now, but I think you could pass reference to data object (type ref to DATA) and deference it outside the method typing it respectively. I cannot however confirm this right now (no access to system) so here I may mistake. Try it out though.
    Regards
    Marcin

  • How to know that a method has been called and returning value of a method

    Hi, everyone! I have two questions. One is about making judgment about whether a method has been called or not; another one is about how to return "String value+newline character+String value" with a return statement.
    Here are the two original problems that I tried to solve.
    Write a class definition of a class named 'Value' with the following:
    a boolean instance variable named 'modified', initialized to false
    an integer instance variable named 'val'
    a constructor accepting a single paramter whose value is assigned to the instance variable 'val'
    a method 'getVal' that returns the current value of the instance variable 'val'
    a method 'setVal' that accepts a single parameter, assigns its value to 'val', and sets the 'modified' instance variable to true, and
    a boolean method, 'wasModified' that returns true if setVal was ever called.
    And I wrote my code this way:
    public class Value
    boolean modified=false;
    int val;
    public Value(int x)
    {val=x;}
      public int getVal()
      {return val;}
       public void setVal(int y)
        val = y;
        modified = true;
         public boolean wasModified()
          if(val==y&&modified==true)
          return true;
    }I tried to let the "wasModified" method know that the "setVal" has been called by writing:
    if(val==y&&modified==true)
    or
    if(x.setVal(y))
    I supposed that only when the "setVal" is called, the "modified" variable will be true(it's false by default) and val=y, don't either of this two conditions can prove that the method "setVal" has been called?
    I also have some questions about the feedback I got
    class Value is public, should be declared in a file named Value.java
    public class Value
    cannot find symbol
    symbol  : variable y
    location: class Value
    if(val==y&&modified==true)
    *^*
    *2 errors*
    I gave the class a name Value, doesn't that mean the class has been declared in a file named Value.java*?
    I have declared the variable y, why the compiler cann't find it? is it because y has been out of scale?
    The other problem is:
    Write a class named  Book containing:
    Two instance variables named  title and  author of type String.
    A constructor that accepts two String parameters. The value of the first is used to initialize the value of  title and the value of the second is used to initialize  author .
    A method named  toString that accepts no parameters.  toString returns a String consisting of the value of  title , followed by a newline character, followed by the value of  author .
    And this is my response:
    public class Book
    String title;
    String author;
      public Book(String x, String y)
       { title=x; author=y; }
       public String toString()
       {return title;
        return author;
    }I want to know that is it ok to have two return statements in a single method? Because when I add the return author; to the method toString, the compiler returns a complain which says it's an unreachable statement.
    Thank you very much!

    Lets take this slow and easy. First of all, you need to learn how to format your code for readability. Read and take to heart
    {color:0000ff}http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html{color}
    Now as to your first exercise, most of it is OK but not this:   public boolean wasModified()
          if (val == y && modified == true)
                return true;
    y being a parmeter to the setValue method exists only within the scope of that method. And why would you want to test that anyways? If modified evaluates to true, that's all you need to know that the value has been modified. So you could have   public boolean wasModified()
          if (modified == true)
                return true;
       }But even that is unnecessarily verbose, as the if condition evaluates to true, and the same is returned. So in the final analysis, all you need is   public boolean wasModified()
          return modified;
       }And a public class has to be declared in a file named for the class, yes.
    As for your second assignment, NO you cannot "return" two variables fom a method. return means just that: when the return statement is encountered, control returns to the calling routine. That's why the compiler is complaining that the statement following the (first) return statement is unreachable.
    Do you know how to string Strings together? (it's called concatenation.) And how to represent a newline in a String literal?
    db

  • Sorting and return values from parralell arrays

    import java.io.*;
    import java.util.*;
    class Check{
         String words;
         String signature;
         Check(String w, String s){
              words = w;
              signature = s;
    class Test{
         static String[]a = new String[100];
         static String[]b = new String[100];
         public static void main(String[] args)throws IOException{
              Scanner in = new Scanner(new FileReader("input.txt"));
              //Check []ch = new Check[100];
              String str = in.next();
    int z = 0;
          while(!(str.equals("$$$$"))){            
           a[z] = str;
           b[z] = getNumberSequenceFromString(str);
           z++;
           str = in.next();
              insertionSort(a,0,z);
              insertionSort(b,0,z);
         //     for(int i = 0; i < z; i++){
    ///     System.out.println(a);
              for (int i = 0; i < z ; i++){
                   System.out.println(a[i]+" "+b[i]);
              String key = "225533";//should give the word "move", istead it is giving me "TEXT" which is incorrect
              int rope = binarySearch(key,b,0,z-1);
              System.out.println("rrrrrrrrrrrrrrropr "+ rope);
              System.out.println("i found him :"+a[rope/2]);
         }//end main
         public static String getNumberSequenceFromString(String word){
              int l = word.length();
              String str = " ";
              word = word = word.toLowerCase();
         for(int i = 0; i < l; i++){
                   char y = word.charAt(i);
         if(y < 100){
              str +=2;
         }else if(y < 103){
              str +=3;
         }else if( y < 106){
              str +=4;
         }else if( y < 109){
              str += 5;
         }else if(y < 112){
              str += 6;
         }else if(y < 116){
              str += 7;
         }else if (y < 119){
              str += 8;
         }else{
              str +=9;
         }//end for
              return str;
         }//end getWord();
         public static void insertionSort(String[]list,int lo, int n){
         for(int j = lo+1; j < n; j++){
              String key = list[j];
              int k = j-1;
              while(k >= lo && key.compareToIgnoreCase(list[k]) < 0){
                   list[k + 1] = list[k];
                   --k;
              }//end while
              list[k+1] = key;
         }//end for
    }//end insertion sort
         public static int binarySearch(String key, String[]b, int lo, int hi){
         while(lo <= hi-1){
              int mid = (lo + hi)/2;
              System.out.println("i am mmmmmmmmmmmmmid" + mid);
              int cmp = key.compareToIgnoreCase(b[mid]);
              if (cmp==0)return mid;
              if (cmp < 0)hi = mid -1;
              else lo = mid + 1;
         }//end while
         return lo;
    }//end binarysearch
    }//end classAbove is my revise code.  Your idea worked fine, thank you.  I have a problem though.  I tried to create a class eg:
    class Check{
    String words;//for words
    String signature; //for numbers
    Check (String w, String s){
    words = w;
    signature = s;
    The idea was to store the word and its signature as an object, after which I would sort.  Howerver, when I tried reading in the values eg: check[]=str, number, it did not work.  I tried 2 separate arrays, but now I cannot return the correct word. I need some help on this one.
    Questions:
    How could I combine both arrays so that I could sort them, then search a value in the array and return the correct string?
    I tried a class but i could not get it to work.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    I'm not going to try to read all that messy code. Here is some advice.
    1. Don't use parallel arrays.
    2. If you're going to insist on doing it the wrong way and using parallel arrays, then first get your sort working for a single array.
    3. If you're going to insist on doing it the wrong way and using parallel arrays, then after getting the sort to work with a single array, in the part where you're swapping elements, whatever you do to swap in the first array, you'll need to do to the second array as well.
    4. Break your code down into methods.

  • How to pass a function with the same argument multiple times and return values in variables?

    The problem I have is I created a function which really is some kind of database.  Basically a bunch of:
    if (a.value == "this number"){
    b.value = "this expression";
    Inside the form are 2 dropdown lists that return numerical values which I want to process through that function and put the return value inside separate variables.
    var a = this.getField("OPE003.EVEN.1.MIP");
    Mip(a);
    var result1 = Mip();
    I tried to overwriting *a* to process the second field
    a = this.getField("OPE003.EVEN.2.MIP");
    Mip(a);
    var result2 = Mip();
    result1 and result2 are put in an array, joined as a string.
    Doing so, I always get the last processing twice as the final result.
    Can I use a function as a batch processing tool that way?

    You are right, I changed the code to what you said but how do I pass another value through my fonction so I can get Result1 and Result2?
    is it
    var a = this.getField("OPE003.EVEN.1.MIP");
    var b = this.getField("OPE003.EVEN.2.MIP");
    var result1 = Mip(a);
    var result2 = Mip(b);
    var c = new Array[result1, result2]

  • Adding a RAID card to help speed up export (and other drive question) in Premiere Pro CC

    First of all, I have read Tweakers Page exporting section because that is where my primary concern is. First my questions, then background and my current and proposed configurations:
    Question 1: Will adding a hardware RAID controller, such as an LSI MegaRAID remove enough burden from the CPU managing parity on my software RAID 5 that the CPU will jump for joy and export faster?
    Question 2: If true to above, then compare thoughts on adding more smaller SSDs for either a one volume RAID 0 or smaller two volume RAID 0 to complement existing HDD RAID 5. That is, I'm thinking of buying four Samsung 850 Pro 128 GB SSDs to put in a four disk volume to handle everything (media/projects, media cache, previews, exports), or split it up into two volumes of two disks each and split the duties, or keep the four disk volume idea and put the previews & exports on my HDD RAID 5 array.
    The 850's are rated at SEQ read/write: 550/470 MB/s thus I could get around 2000/1500 MB/s read write in a four disk RAID 0 or 1/2 that if I split into two volumes to minimize volumes from reading/writing at the same time, if that really matters with these SSDs?
    The Tweaker's page made a few comments. One is splitting duties among different disks, rather than a large efficient RAID may actually slow things down. Since the SSDs are much faster than a single HDD, I'm thinking that is no longer accurate, thus I'm leaning toward the Four disk configuration putting OS & Programs on C drive, Media & Projects on D (HDD RAID 5), Pagefile & Media Cache on SSD (2-disk RAID 0) and Previews &Exports on 2nd SSD RAID 0 (or combine the two RAID 0's and their duties).
    Just trying to get a perspective here, since I haven't purchased anything yet. Any experience/stories, I would appreciate.
    My current drive configuration:
    My D drive is software RAID 5 consisting of four 1 TB Western Digital RE4 (RED) 7200 RPM HDDs with a CrystalDiskMark SEQ Read/Write of 339/252 MB/s.
    The C drive is SSD 500 GB (Samsung 840 (not Pro) and does 531/330 MB/s. My OS, Program Files and Page File are on C, and data/media files/project, etc all are on the RAID drive.
    Problem:
    Current setup allows for smooth editing, only the exporting seems slow, often taking between two and two and a half times the video length to export. Thus a 10 minute video takes 20-30 minutes to export. 15 minute video can take 30-40 minutes to export. The first 10% of the two-pass export takes under a minute (seems fast), but it gets slower where the final 10 or 20% can hang for many minutes like my system is running out of steam. So where is the waste?
    I have enabled hardware acceleration (did the GPU hack since my GPU isn't listed) and it may spike at 25% usage a few times and eat up 600 MB of VRAM (I have 2 GB of VRAM), otherwise it is idle the whole export. The CPU may spike at 50% but it doesn't seem overly busy either.
    Our timeline is simple with two video streams and two audio streams (a little music and mostly voice) with simple transitions (jump cuts or cross dissolves). We sometimes fast color correct, so that might use the GPU? Also, since we film in 1080 60P and export 1080 29.97 frames/sec, I think that is scaling and uses the GPU. I know without the GPU, it does take a lot longer. I have ruled out buying a faster GPU since it doesn't appear to be breaking a sweat. I just need to know if my system is bottlenecked at the hard drive level because I'm using software RAID and my disks are slow and will hardware RAID significantly reduce the CPU load so it can export faster.
    Our files are not huge in nature. Most our clips are several MBs each. Total project files are between 5 GBs and 10 GBs for each video with Windows Media File export being 500 MB to 1.2 GB on average. We shoot using Panasonic camcorders so the original files are AVCHD, I believe (.MTS files?).
    Considerations:
    1. I'm thinking of buying (and future proofing) an LSI Logic MegaRAID 9361-8i that is 12Gb/s SAS and SATA (because some current SSDs can exceed the 6Gb/s standard).
    2. I'm not replacing my current RAID 5 HDDs because not in my budget to upgrade to 6 or more large SSDs. These drives are more important to me for temporary storage because I remove the files once backed up. I don't mind a few inexpensive smaller SSDs if they can make a significant difference for editing and exporting.
    I can only guess my HDD RAID is slow but the CPU is burdened with parity. I would imagine running RAID 10 would not help much.
    My setup:
    my setup:
    CPU - i7-3930K CPU @4.5 GHz
    RAM - G.SKILL Ripjaws Z Series 32GB (4 x 8GB) DDR3 2133 @2000
    Motherboard - ASUS P9X79 WS LGA 2011
    GPU - Gigabyte GeForce GTX 660 OC 2GB (performed the compatibility list hack to enable hardware acceleration).
    C drive - 500 GB Samsung 840 SSD (Windows 7 Pro 64 bit and programs).
    D drive - four 1 TB WD RE4 Enterprise HDDs 7200 RPMs in software RAID 5
    Case - Cooler Master HAF X
    CPU Fan - Cooler Master Hyper 212 EVO with 120 mm fan
    Power Supply - Corsair Pro Series AX 850 Watt 80 Plus Gold
    Optical Drive - Pioneer BDR - 208DBK
    thanks in advance,
    Eric

    ........software RAID 5 off the motherboard ??????......NOT a good idea, from what I have read here on this forum from experts like Harm Millard and others. They have mentioned a LARGE overhead on the CPU doing this....causing sub-par performance. RAID 0 off the motherboard will NOT do this, however.....RAID 0 would provide optimum speed, but, with the risk of total data loss if ANY drive fails. You may wish to reconfigure your RAID to be RAID 0...BUT...you would need to DILIGENTLY back up its entire volume onto perhaps a quality 4TB drive very frequently.
         A lot depends on the nature of your current and FUTURE codecs you plan to edit. You may not want to sink a lot of money into an older setup that may have trouble with more demanding future codecs. For now, in the 1080p realm, your rig should be OK....the read/write performance on your CURRENT RAID 5 setup is not great, and a definite drag on the performance. The rest of your components appear to be fine.....the Samsung SSD, though not ideal, is OK.....it's write speed is WAY lower than the Pro model,but, the drive is used mainly for reading operations. Since you have Windows 7 Pro, and NOT Windows 8.......you CAN put the entire windows page file onto the RAID 0 you might create.....this will take that frequent read/write load OFF the SSD. Read the "tweakers Page" to see how to best TUNE your machine. To use your current setup most efficiently, without investing much money, you would :a. create the RAID 0 off the motherboard, ( putting all media and project files on it )  b. install a quality 7200rpm 4TB HDD to serve as a BACKUP of the RAID array. Then, install a Crucial M550 256GB or larger SSD, ( close in performance to Samsung 850 Pro...much cheaper), to put all previews, cache , and media cache files on....AND to use as " global performance cache" for After Effects...if you use that program. Exporting can be done to ANOTHER Crucial M550 for best speed...or, just to the either the FIRST Crucial or, the 4TB drive. Your current GPU will accelerate exports on any video containing scaling and any GPU accelerated effects. Your CPU is STILL important in SERVING the data to and from the GPU AND for decoding and encoding non-GPU handled video....your high CPU clock speed helps performance there ! You may want to check out possibly overclocking your video card, using MSI Afterburner.or, similar free program. Increasing the "memory clock speed" can RAISE performance and cut export times on GPU effects loaded timelines,or, scaling operations. On my laptop, I export 25% faster doing this. With my NEW  i7 4700 HQ laptop, I export in the range of your CURRENT machine....about 2 to 3 times the length of the original video. PROPERLY SET UP...your desktop machine should BLOW THIS AWAY !!
        Visit the PPBM7 website and test your current setup to possibly identify current bottlenecks,or, performance issues. THEN, RE-TEST it again, after making improvements to your machine to see how it does. Be aware that new codecs are coming (H.265 and HEVC,etc.) which may demand more computer horsepower to edit, as they are even MORE compressed and engineered for "streaming" high quality at a lower bandwidth on the internet. The new Haswell E...with its quad-channel memory, 8 core option, large number of PCI gen. 3 lanes, goes farther in being prepared for 4K and more. Testing by Eric Bowen has shown the newer PPro versions provide MUCH better processing of 4K than older versions.

  • SQL SELECT and Return values

    I have a simple SELECT statement in a Stored Proc that
    queries 2 tables in
    SQL Server 2000 using a join. My problem is I want to return
    values based on
    the outcome of the query eg. if a row is returned then return
    1, or return 2
    if no rows are found. I have tried various ways to implement
    this and they
    always work fine in Query Analyser but in Dreamweaver MX2004
    either return
    no return values ( or at least they are not displayed on my
    page ) or the
    return values are inconsistent. I am using a DW Command.
    I know this is DW and not my code as Query Analyser produces
    the correct
    values every time. Can anyone tell me what code I can use
    that is DW
    friendly please.
    Thanks.

    I read your note with a great degree of sympathy but no
    solutions. I was having the same trouble with access tables after 4
    years of trouble free connections. It may not be relevant but the
    solutions for my problem was a Server software SP release. Details
    are:
    Following the avalanche of hints and tips I am pleased to
    report that there is a problem with Dreamweaver MX and MX2004 when
    connecting to Access databases running on Windows Server 2003 SP1.
    Whilst it is covered in the knowledge base I note that others in
    the forum are having similar difficulties with Sequel connections
    and unable to retrieve failures.
    There is a "fix" - SP2DBFix1.0.2.mxp - for my problem and I
    cannot be alone in experiencing this.
    And just in case anyone from Adobe is reading this, you
    should have written to all your registered and paid up members
    informing us of this problem when WS2003 SP1 was released!
    Hope this helps.

  • EDL Exporting and Importing 101 - Questions

    We are testing Premiere's EDL exporting and importing capabilities for the first time, and are having issues. We set up a very simple test project with only 13 clips and a timeline with only 10 edits. This is what it looks like:
    http://img819.imageshack.us/img819/760/j00s.jpg
    We then exported an EDL, started a new Premiere project, and imported the EDL that we had created. It looks like this:
    http://imageshack.us/scaled/landing/32/6hd9.jpg
    In the bin, Premiere has now turned our 13 clips into 41. There are a lot of duplicates, some of them appear to be audio files, even though they're still listed as .mxf, and the start and end times are all over the place. Our two questions are: Why is it making all of these clips? And how do you link the media? We started linking some media manually, but because the start and end times are scrambled, the edits appear completely wrong in the sequence that we've created.

    There are a variety of options offered when exporting an EDL.
    These options need to be considered in conjunction with how the Sequence (audio/video layers) are set up. (managed for the edl export)
    Source footage management is vital in any EDL workflow and even more so when digital clip based ( as opposed to tape based linear assets).  ie. Digital clips have "unusual" filenames and are buried deep in folder structures. Filenames can be duplicated in a card to cards system. (mxf would be an exception)
    The EDL is usually used between systems.
    In your case  you are testing on the same system and assumeably the source footage resides there as well.  This is a case for managing the "source" so as the links work.
    Example. When I take footage to a Resolve Suite out of house.  I set up all the source footage on an transfer drive in the same manner ( filenames, folder names etc) as the original local drive .

  • Procedure which inserted and returns value

    i don't know english very vell and sorry about it :(((
    i want write a procedure which inserted or updated table and returns it's ID ...
    it's my tabel :
    DROP TABLE T_STUDENT CASCADE CONSTRAINTS;
    CREATE TABLE T_STUDENT
    ID NUMBER(10) NOT NULL,
    NAME VARCHAR2(100) NOT NULL,
    SURNAME VARCHAR2(100) NOT NULL,
    AGE NUMBER(38) NOT NULL,
    CNAUTHORID NUMBER(10) NULL
    and i have procedure which inserted or updated this table and return's ID (if ID<=0 then inserted else updated):
    CREATE OR REPLACE procedure sp_InsertUpdate_T_STUDENT
    nResID in out NUMBER,
    nID in NUMBER,
    vchNAME in VARCHAR2,
    vchSURNAME in VARCHAR2,
    nAGE in NUMBER,
    nCNAUTHORID in NUMBER
    as
    begin
    if nID<=0 then
    insert into T_STUDENT (NAME,SURNAME,AGE,CNAUTHORID) values (vchNAME,vchSURNAME,nAGE,nCNAUTHORID );
    else
    update T_STUDENT set NAME=vchNAME,SURNAME=vchSURNAME,AGE=nAGE,CNAUTHORID=nCNAUTHORID
    where ID=nID;
    end if;
    select ID into nResID from T_STUDENT where NAME=vchNAME and
    SURNAME=vchSURNAME and AGE=nAGE and CNAUTHORID=nCNAUTHORID;
    end;
    this procedure is correct but maybe returns more then one ID and i don't want it :( ....... how i can write this procedure otherwise ???

    First of all does yout insert statement work??
    insert into T_STUDENT (NAME,SURNAME,AGE,CNAUTHORID) values (vchNAME,vchSURNAME,nAGE,nCNAUTHORID )
    Should you not insert also the value ID?
    The way i would do this was first since u have only have one return value is a function like this:
    function sp_InsertUpdate_T_STUDENT
    nID in NUMBER,
    vchNAME in VARCHAR2,
    vchSURNAME in VARCHAR2,
    nAGE in NUMBER,
    nCNAUTHORID in NUMBER
    ) return number
    is
    ln_id number;
    begin
    if nID<=0 then
    insert into T_STUDENT (ID,NAME,SURNAME,AGE,CNAUTHORID) values (SEQ_ID.NEXTVALUE,vchNAME,vchSURNAME,nAGE,nCNAUTHORID ) returning ID into ln_id;
    else
    update T_STUDENT set NAME=vchNAME,SURNAME=vchSURNAME,AGE=nAGE,CNAUTHORID=nCNAUTHORID
    where ID=nID;
    ln_id := nID;
    end if;
    return ln_id;
    end;

  • Multithreading and Returning Value from RMI

    Hi all,
    I have an RMI Object which is Multi Threaded. The scenario is like this:
    The client program will pass different program specific codes to the RMI object. Multiple clients can pass same or different codes. If the codes are different they can share common data in an asynchronous way other wise they need to be synchronized.
    This RMI object will do some database transactions and will return a value to the client. I am not sure how to return a value to the client which has invoked this method as this method executes asynchronously.
    I am sorry if this posting is inappropriate for this forum.
    Thanks in Advance
    Srinivas

    If the database transaction executes asyncrhonously, the remote method has to wait for it and return the result via the return statement.
    As the remote request is already executing in a thread of its own there is of course no need for the database transaction to execute asynchronously from RMI's point of view so if you can get rid of that complication in your architecture you may as well do it. OTOH your application architecture may do it for other reasons

  • Skipping and returning to questions in Captivate 5

    Hi folks,
    Is there any way, in Captivate 5, to allow users to skip quiz questions, but automatically return to skipped questions at the end of the quiz, before the results page comes up?
    I need to include a required quiz in a module, but let the users skip questions and come back to them later. I know that checking "Allow Backward Movement" allows the user to go back and answer skipped questions. But I'm trying to see if there's a way to get Captivate to automatically do this, rather than require the user to remember how many and which questions they skipped, and to have to go back to them.
    Thanks in advance for your help,
    Mahdi

    You could probably do this with Advanced Actions, trying to track the questions that have or have not been answered.  But it would be somewhat complex.
    I don't know of any simple way to do it in Cp.

  • CWDAQTools and return value

    What does the integer return value of the Calibrate E series function mean? (0 pass 1 fail ?????)
    Curt

    Curt,
    It returns an error code. If you set the ExceptionOnError property to true, then an exception is thrown.
    0 means that there was no error. If it is a negative number, the number indicates an error code, if it is positive, then its a warning.
    If you get an error, you can use the NI-DAQ error codes topic, to figure out what the error means, or search the Measurement studio help.
    Hope this helps. Please let me know if you have more questions.
    Nandan Dharwadker
    Staff Software Engineer
    Measurement Studio Hardware Team

  • Help : Complex parameter and return value in WebService?

    Hi guys
       These days, I publish a WebService, in it there is an
    operation like this:
       List search(List para);
       in this operation, parameter "para" is a java.util.List, which contains many elements, every element is an instance of customizing class "MyItem", I made "MyItem" implements java.io.Serializable interface. Strangely, when I call this operations in my java client,
    I found that I could not get out every element from para in server-side, but para.size() is showing it contains 10 elements in it. The same thing happen to the return value of this operation, in client, I got an instance of java.util.List class as the return value, when I try
    System.out.println(result.get(0)); it output "null", but
    result.size() is 10, I don't know how to explain this
       Does anyone who encounter this issue too?
    I guess it has something to with the Serializable issue ,but I have made every List item serializable, why it looks like this??

    Hi Kevin,
    I answered you by mail some days ago, but just to complete the thread, I am posting the hint also here:
    Custom types should be manually added to the Virtual Interface, so that they can be serialized.
    Best regards,
    Alexander

Maybe you are looking for

  • Is album artist sort available on iPod classic now?

    If I buy an iPod Classic today, is there an option to have artists sorted by album artist? Thank you

  • What is an energy report ................

    pls let me know and pls send me a dummy program for this .......... Message was edited by:         BALA REDDY

  • Oracle Text Web Search

    Can someone point me to some tutorials for a simple web search app using oracle text? Thanks in advance, New-B

  • IPhoto 08 Web Gallery Auto-resize?

    I am using iPhoto 08 to create a Web Gallery but have very large photo files. Does iPhoto upload at the original file size or does it automatically scale down to sizes more appropriate for web viewing? I want to ensure people can download photos from

  • Airport extreme won't work without router/switch

    Hi all, I'm a bit dumbfounded here and am hoping you can give me some answers.  I've been having connectivity issues, specifically with random pages not loading while on wifi (all devices).  They work just fine on my iPhone through LTE so I decided t