SO_OBJECT_SEND in a loop problem

Hello
I have problem with FM SO_OBJECT_SEND.
I call it in a loop.
After every call I explicitly call COMMIT WORK.
Problem is that only first email is sent.
Everything looks fine no exception is caught
so I cannot event react on such situation.
Mybe there is some buffer that is supposed to be cleared
or somethig?
Have You faced a similiar problem?
Thanks in advance
Wojtek

Hi.
Please check the below link
[https://forums.sdn.sap.com/click.jspa?searchID=16108450&messageID=5975625]
Regards,
Surinder

Similar Messages

  • Not the usual 'login loop' problem, help.

    The login loop problem I'm facing is not the usual login loop problem when starting up mac; it's when I'm trying to log into websites or applications (most of them, eg. facebook, instagram).
    I have tried:
    using other browsers: Safari, Firefox, Maxthon, Chrome
    clearing all cookies / caches / keychains / passwords
    repairing disk
    deleting launchservices cache
    using other userid to login
    All to no avail.
    How do I solve this without having to reformat/install mac?
    Thank you.

    Hi, are you using Parental contrils or a managed account, or an admin account?
    Using any Anit-Vrus software?

  • Trying SSH CLI ,  reading command line method is infinte loop problem!

    I am trying excute command and reading result. but reading result part has problem.
    below source is a part of my method.
    try{
                   SessionChannelClient sessionChannel = ssh.openSessionChannel();
                   sessionChannel.startShell();
                   OutputStream out = sessionChannel.getOutputStream();
                   String cmd = s + "\n";
                   out.write(cmd.getBytes());
                   out.flush();
                   InputStream in = sessionChannel.getInputStream();
                   BufferedReader br = new BufferedReader(new InputStreamReader(in));
                   byte buffer[] = new byte[255];
                   String read= "";
                   while (true) {
                        String line = br.readLine();
                        if (line == null)
                             break;
                        str += line;
                        str += "\n";
                   System.out.print(str); //print result
                   sessionChannel.close();
                   in.close();
                   out.close();
              }catch(IOException ee){
                   System.out.println(ee);
              }finally{
                   System.out.println("=============end cmd=============");
    while loop has problem. While statement has infinite loop problem.
    why has this problem?
    anybody, help me please. Thanks for reading .
    Edited by: BreathAir on Aug 5, 2008 12:16 AM

    That loop will loop until readLine() returns null, which will only happen when the other end closes its end of the connection, and it will block while no data is available.

  • Sony D-50 "boot-up loop" problem

    I have a Sony D-50 portable recorder barely three months old that did something totally strange. Has anyone else had this problem?
    During a shoot yesterday, I noticed that the Sony D50 I bought back in August would not turn OFF.
    When I moved the power switch to the OFF position, the machine went into a "boot up loop," that is:
    I'd turn it OFF after recording.
    Screen goes black.
    I get the "See you!" message.
    Screen lights up again.
    The word "SONY" appears as though it's gonna boot up,
    Then the whole process starts over again
    Screen goes black.
    I get the "See you!" message.
    Screen lights up.
    The word "SONY" appears as though it's gonna boot up....
    So, same thing late last night.
    I get up this morning and turn it ON; it works fine until I turn it off, then it goes back into the "boot loop" thing again.
    I tried everything I could think of, even searching for a "RESET" on the machine and in the Menu. I finally had to take the batteries out of it to shut it down.
    Then, I did something that apparently---so far---fixed it.
    This is so strange---right out of the Twilight Zone:
    I put the batteries back in it, then it starts the loop again.
    Since it won't turn OFF, I take the batteries out of it in the OFF position. I wait five minutes and put the batteries back in it with it in the OFF position.
    Same problem---the "boot up loop" thing.
    I take the batteries back out of it again in the OFF position and wait fifteen minutes. I put the batteries back in it while it's still in the OFF position. Guess what?
    Problem solved: It's doesn't start the "boot up loop" thing.
    So, I turn it back ON. Machine boots up fine and is ready to record.
    OK, I turn it OFF.
    Back to the exact same problem---It shuts down and goes into the "boot up loop" again.
    I go back through the same process of removing and installing the batteries with the machine in the OFF position.
    Nothing changes.
    Then, I have an idea.
    With the machine in the OFF position and going through the "boot up loop" thing, I remove the batteries.
    I then move the power switch to the ON position before I put the batteries back in it---had not tried that before: reinstalling the batteries with it in the ON position. I install the batteries with the machine in the ON position.
    Machine boots up fine and is ready for recording.
    Now, I turn it OFF.
    The machine shuts down fine with no "boot up loop" problem.
    Putting the batteries back in the machine with it in the ON position instead of the OFF position apparently solved the problem.
    So, I turn it back ON and then OFF several times.
    Same thing: No "boot up loop" problem.
    Do-do-Do-do....
    The machine now works fine.
    Anyone ever had this happen to a Sony D-50?
    I'm wondering if I should send it to back to Sony before it does this again. For God's sake, it's only three months old!
    I bought it after rave reviews in the "recorder" community, and I haven't found anyone else who has had this problem with one..

    Sorry to see that you were having this issue with your PCM-D50 Linear PCM Recorder - if you continue having the issue the unit may need service - give Sony Business and Professional team a call and they will be happy to assist:
    http://pro.sony.com/bbsc/ssr/services.s ... port.shtml

  • Possible solution to "Looping" problem

    Hello all, I've read several threads here dealing with a "looping" problem, I'm not sure what the ins-and-outs of this issue is but it seems to affect many different config and different manufacturers are blaming each other... check out the link below (mind the wrapping) for what might be a real solution at the Via forums. I happened upon this because I could not get a stable system out of my MSI via-km266 mobo with dual display.
    http://forums.viaarena.com/messageview.cfm?catid=25&threadid=9263&highlight_key=y&keyword1=dual%20display
    Alpay Eno

    What is the problem? Let the filters return a List instead of an array. Am I missing something?
    Kaj

  • Game center registration loop problem

    I have tried to reigister for the game center with my Apple ID and the message that the Apple ID has not been used in Game center... I tap continue. I enter my location, then my date of Birth.
    After this I get the same message again. "This Aplle ID has not yet been used in Game center" and i'm asked to enter my location again and then DOB and then I go back to the same message. I can't get past this loop.
    (I have tried turing up phone off and on again, and it still does not work)
    can any one help me ?

    I had exactly the same problem on my sons ipod 4th gen.
    I tried logging on using my phone and it worked fine.

  • Infinite loop problem

    Hi there,
    This is the second time I have posted this problem, as the last solution I was offered did not seem to work. Here is the problem:
    I have written a method to search through a text file for a word and replace it with another word. That word can either be on its own in the document or as part of another word. So, if the search word was "foot" and the replace word was "dog", the word "football" in the document would become "dogball".
    This method works fine, except for when the replace word is the same as the search word. Basically, if someone searched for "dog" and wanted to replace it with "dog dog" or even just "dog", the program goes into an infinite loop. I understand why it is doing this, but I don't know how to prevent it from happening.
    Now, to make it worse I have to stick to this array style structure and method of solving the problem. I know there is a way to do this by building temporary strings and then concatenating them at the end and returning them to their previous position in the array. The reason I know this is because a friend of mine has managed it. She also happens to be a girl.
    So, I am asking you all to assist in defending men's intelligence by helping me see where I am going wrong in this method. Please.
    Here is the method:
    // Search the document for a string and replace it with another string        
         public String [] SearchReplace() {
              // Declare variables to be used in the method
              String SecondSubstring;
              String FirstSubstring;
              int ReplaceNumber = 0;
              // Loop through the lines of text stored as strings contained in the array
              for (int i = 0; i < NumberOfLines; i++) {
                        // As long as the string contains an instance of the search string, run the method                    
                        while (StrArray.indexOf(SearchW) >= 0) {
                             // Make a string of all the characters after the search word
                             SecondSubstring = StrArray[i].substring(StrArray[i].indexOf(SearchW) + SearchW.length());
                             // Make a string of all the characters before the search word
                             FirstSubstring = StrArray[i].substring(0, StrArray[i].indexOf(SearchW));
                             // Concatenate FirstSubstring with the replace word to make a new string
                             String FirstHalf = FirstSubstring.concat(ReplaceW);
                             // Concatenate the new string with SecondSubstring to make the whole replaced string
                             String FullString = FirstHalf.concat(SecondSubstring);
                             // Put this altered string back to its original place in the array
                             StrArray[i] = FullString;
                             // Increment ReplaceNumber to count the replacements made
                             ReplaceNumber++;
              // Print the numbers of replacements made
              System.out.println("\nA total of " + ReplaceNumber + " changes made.\n");
              // Display the searched and replaced contents of the file
              return StrArray;
    Any suggestions, pointers or solutions would be much appreciated.
    Thanks very much.

    Doing it the "old fashioned" way:
    You need to keep track of a "from index" so you don't search through parts of the string you've already replaced:
           public static void main(String args[]) {          
              try {     
                   String[] lines = new String[] {
                        "the dog went up the dog hill",
                        "all dogs go to dog heaven",
                        "the dogball takes place on 3rd april"
                   lines = replace(lines, "dog", "dog dog");
                   for (int i = 0; i < lines.length; i++) {
                        System.out.println(lines);
              } catch (Exception e) {
                   e.printStackTrace();
         private static String[] replace(String[] lines, String searchWord, String replaceWord) {
              if (searchWord.equals(replaceWord)) return lines; // nothing to do          
              for (int i = 0; i < lines.length; i++) {
                   int fromIndex = 0; // from index to do indexOf
                   String line = lines[i];
                   while (line.indexOf(searchWord, fromIndex) != -1) {
                        final int index = line.indexOf(searchWord, fromIndex);
                        line = line.substring(0, index) + replaceWord + line.substring(index + searchWord.length());
                        fromIndex = (line.substring(0, index) + replaceWord).length();
                   lines[i] = line; // replace
              return lines;

  • Do while loop problem

    I have a problem with do while loop. I am displaying a dialogue box where a person should enter the type of quiz he had performed. The problem is that the user should enter only the following 3 words, either "Earthquakes" or "Place" or "Animals". If the user enters any other word, he/she should be displayed wwith another message saying "Invalid". This should keep repeatinf (i.e. displaying invalid) until the user enters either of those 3 words. When a user enters one of those words it will stop diplaying "Invalid". I tried doing this, but altough it displays "Invalid" when a user enters an invalid word, it will display invalid also when a user neters the correct word. I think i have something wrong with the loop.
    This is the code:
         String player = JOptionPane.showInputDialog(null, "Enter name");
                 String type = JOptionPane.showInputDialog(null, "Enter your quiz type");
                do
                    type = JOptionPane.showInputDialog(null, "Invalid entry. Try again." );
                 while (type != "Earthquakes"  || type != "Place" || type != "Animals" );

    Yeah thats a good idea, but i'm still a beginner and i'm still new to some things. I got a problem, because altough the while loop is working correctly, however the first time i enter a word even if its correct its still displays invalid. I think that thats a property of the while loop. So can someone pls tell me how can i change this loop and use another loop that wouldn't do this. Can i use perhaps a for loop instead here? Thanks a lot.
    String player = JOptionPane.showInputDialog(null, "Enter name");
              String type = JOptionPane.showInputDialog(null, "Enter your quiz type");
                  do {
                      type = JOptionPane.showInputDialog(null, "Invalid entry. Try again." );
                   } while(!type.equals("Earthquakes") && !type.equals("Places") && !type.equals("Animals"));
                Edited by: datax on Feb 21, 2008 10:46 AM

  • While loop problem

    I have a problem with a while loop in this code and it is really holding me up doing my degree. I can see nothing wrong with it but perhaps someone here can help. I would be really greatful if someone could. I have commented the line where the while loop starts about a third of the way down the code.
    Thanks
    Michael
    if (ae.getSource()==client_open)
    int row=0;
    check=true;
    row=client_listing.getSelectedRow();
    try
    System.out.println("information[row][1] is "+information[row][1]);
    if(information[row][1]!=null) //if the index is not null. Comment out this if statement to troubleshoot
    try
    InetAddress inet=InetAddress.getByName(information[row][1]);
    //Create a client socket on the listeners machone on port 7070
    client_socket=new Socket(inet,7070);
    System.out.println("Client port open on 7070 ");
    //Get the output as well as the input streams on that socket
    BufferedOutputStream out=new BufferedOutputStream(client_socket.getOutputStream());
    BufferedInputStream br_socket=new BufferedInputStream(client_socket.getInputStream());
    XMLWriter writer=new XMLWriter();
    writer.requestFString("SHOWFILES"," ");
    String file_data=writer.returnRequest();
    byte file_bytes[]=file_data.getBytes();
    int file_size=file_bytes.length;
    byte b[]=new byte[1024];
    // The methos takes a byte array and it's length as parameters and return
    // a byte array of length 1024 bytes....
    add_on upload=new add_on();
    System.out.println("Class of add_on created sucessfully");
    b=upload.appropriatelength(file_bytes,file_size);
    out.write(b,0,1024);
    /*An output stream is also initialised. This is used to store all the response
    from the listener */
    BufferedOutputStream out_file=new BufferedOutputStream(new FileOutputStream("response.xml"));
    int y=0;
    byte f[]=new byte[32];
    System.out.println("Entering while loop");
    //This while loop is not working. Any ideas. It just hangs here
    while((y=br_socket.read(f,0,32))>0) //the socket input stream is read
    out_file.write(f,0,y); //written on to the file output stream, y bytes from f start @ ofset 0
    out.close();
    br_socket.close();
    out_file.close();
    System.out.println("Exited while loop and closed streams");
    catch(Exception e)
    client_socket=null;
    check=false;
    System.out.println("Didnt enter try");
    try
    client_socket.close();
    catch(Exception e)
    System.out.println("Error occuered "+e.getMessage());
    row=0;
    if(check) //If the exception occurs then do not come here
    Vector parameters=new Vector();
    // A class SParser is also used here this class has a function/method of
    // the name perform which calls the xml parser to parse the xml file
    // generated by the response from the client soket...
    // the function perform returns a Vector which has the files/directories,
    // along with their flag information and size in case of files....
    SParser sp=new SParser();
    System.out.println("SParser object created sucessfully");
    parameters=sp.perform("response.xml");
    System.out.println("Parsing finished ");
    // The vector value returned by the xml parseris then passed as one of
    // the parameters to a class named file_gui this class is responsible for
    // displaying GUI consisting of a table and some buttons along with the
    // root information and flag..
    // Initially since the class is called for the first time the parameter
    // for the root is given the name "ROOT" and the Flag is set to "0"..
    file_gui showfiles=new file_gui(parameters,information[row][1],"Root","0");
    showfiles.show();
    check=false;
    } //end if
    } // end if
    } //end try
    catch(Exception e)
    row=0;
    } //end of ae.getSource()

    Why do you think it hangs at the while loop, eh? You need to put in additional printlns to justify your assertion. It takes alot less time to diagnose if you put in specific try/catch blocks with their own printlns - even if it is not as much fun. When you get into these kinds of troubles, there is no shame in putting in prints at each statement or logical point to track down the actual fault.
    ~Bill

  • External monitor causes earth loop problems

    When i connect an external monitor to my macbook pro it creates horrible interference, soudns like an earth loop somewhere but i can't stop it.
    Is very irritating!
    Any suggestions would be much appreciated.
    cheers,
    josh

    still has horrible interference. Think its not an earth problem now as the interence is more than a simple hum problem, it changes when i click mosue or open applications and can hear digital nastiness to it.
    I spoke to a lecturer at uni who has the same problem he seems to thinks its a design fault with the core audio processors position i nthe mac. Its very near next to the circuits for the external monitor and it causes the intereference or soemthing like that when an external monitor is connected. Though mac are known to be good for msuci production for stablilty and software support the core audio is far too noisey even without external monitor plugged in so i feel the only way to resovle this is with an external soudncard. When used with my RME fireface the interference disappears but this card is for my PC as i don't wanna be taking out adn about with me for obvious reasons! Maybe a nice edirol FA-66 will be in my stocking at christmas...
    cheers for the reply.

  • Looping Problem with External Files

    This is what I'm trying to build: A swf file (called main)
    that loads 4 external swf files (called intro, one, two, and
    three). At the start, main.swf loads the intro.swf, and it plays
    once. When intro is done, main loads and plays one.swf. This will
    loop until the user hits one of the buttons, and then two or three
    starts playing.
    What I have done already: Coded buttons. Code works.
    What I am having a problem: I want intro.swf to play just
    once, but it keeps looping. It's supposed to play once, and then
    one.swf is supposed to start looping. Is there anyway to tell intro
    to loop just once? (What I've tried already: a stop() function at
    the end of intro.swf clip, publishing intro.swf with 'no loops'
    setting.)
    (Talk slowly; I have almost no idea how to code in
    flash.)

    Edit: Really? No problem? Weird.. I find that all of the
    imported swf files loop infinitely, unless a stop() or
    unloadmovie() function is called, but then I need another button.
    Anyway, I found a workaround, that seems really obvious (in
    hindsight): I just copied the Introduction file into a new scene in
    the Main file. (Algorithm: Preloader, skip to Introduction scene,
    skip back to main scene. External swf files load, depending on what
    button the user clicks on.)
    Even though it's sorted already, I'd still hear what code you
    use. (It might be simplier than what I did.)

  • Looping Problem

    I'm kinda getting confused with my program, my loops are going crazy on me! HELP!
    I'm posting my whole code, so you can try the program yourself:
    import java.io.*;
    import java.io.BufferedReader;
    import java.util.Vector;
    import java.util.Iterator;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.awt.*;
    import java.applet.*;
    import java.awt.event.*;
    public class MRoom extends Applet implements ActionListener, ItemListener
         Label companyName = new Label ("MotelIsta");                              //Company Name
         Label lblRoomQty = new Label ("Number of rooms in MotelIsta: ");     //Label, RmQty
         Button buttSubmitRmQty = new Button("Submit");                              //Button, RmQty
         String strRmQty = "";                                                            //String, RmQty
         Label lblDispRmQty = new Label (" ");                                        //Display, RmQty
         //number of rooms entered by user
         int rmQty=0;                                                                      //Integer, RmQty
         Label roomRate = new Label("Room Rates");
         Label roomTaxi = new Label("Taxi Rate: ");
         Label roomGarage = new Label("Garage Rate: ");
         Label roomSuite = new Label("Suite Rate: ");
         TextField txtRoomQty = new TextField(2);                                   //Txtfield,RmQty
         TextField txtTaxi = new TextField(2);
         TextField txtGarage = new TextField(2);
         TextField txtSuite = new TextField(2);
         TextField txtRmType=new TextField(2);
         public static int taxiRate=0;
         public static int garageRate=0;
         public static int suiteRate=0;
         public static Room[] record;
         public static int rmNumber, rmRate, x=0, y=0;
         public static Choice chooseRmType = new Choice();
         public static String rmType, roomType;
         String strTaxi="", strGarage="", strSuite="", LastN="",FirstN="";
         Button buttSaveUpdate = new Button("Save");
         Button buttSaveCancel = new Button("Cancel");
         Button buttCheckIn=new Button("Check In");     
         Button buttGuestSave=new Button("Reserve");
         public void init()
              setLayout(new GridLayout (20, 2));
              add(companyName);
              add(roomRate);
              add(roomTaxi);
              add(txtTaxi);
              add(roomGarage);
              add(txtGarage);
              add(roomSuite);
              add(txtSuite);
              add(lblRoomQty);
              add(txtRoomQty);
              add(buttSubmitRmQty);
              buttSubmitRmQty.addActionListener(this);
              add(lblDispRmQty);
              txtRoomQty.requestFocus();     
         public void actionPerformed(ActionEvent e)
         {     if (e.getSource() == buttSubmitRmQty)
                   strRmQty = txtRoomQty.getText();
                   rmQty = Integer.parseInt(strRmQty);
                   strTaxi=txtTaxi.getText();
                   taxiRate=Integer.parseInt(strTaxi);     
                   strGarage=txtGarage.getText();
                   garageRate=Integer.parseInt(strGarage);
                   strSuite=txtSuite.getText();
                   suiteRate=Integer.parseInt(strSuite);
                   taxiRate=Integer.parseInt(strTaxi);
                   garageRate=Integer.parseInt(strGarage);
                   suiteRate=Integer.parseInt(strSuite);
                   lblDispRmQty.setText("Rooms are" + rmQty);
                   record= new Room[rmQty];               
                   for(y=0;y<rmQty;++y)
                   record[y] = new Room(1,"TAXI", taxiRate,1, 1,"none", "none");
                   //for (y=0;y!=rmQty;++y)
                   y=0;
                   doRmGen();
                   invalidate();
                   validate();          
              if (e.getSource() == buttSaveUpdate)
    //               System.out.println(record[y].getRmNum()+record[y].getRmType());
                   if (y!=rmQty)
                        ++y;
                        doRmGen();
                   else
                        add(new Label(" Room "+"      "+"Room Type   "+"Room Rate"));
                        add(new Label("     "));
                        for(y=0;y!=rmQty;++y)
                             int n;
                             n=y+1;
                             add(new Label("Room No. "+record[y].getRmNum()+ "     " +record[y].getRmType()+"     "+record[y].getRmRate()));
                             add(new Label("     "));
                             invalidate();
                             validate();
                        add(buttCheckIn);
                        buttCheckIn.addActionListener(this);
                        add(buttSaveCancel);
                        buttSaveCancel.addActionListener(this);
                        invalidate();
                        validate();
         //          rmType = chooseRmType.getSelectedItem();     
              if (e.getSource() == buttSaveCancel)
                   for(y=0;y!=rmQty;++y)
                   System.out.println("Room #" +record[y].getRmNum()+ "  " +record[y].getRmType()+"  "+record[y].getRmRate());
              if (e.getSource()==buttCheckIn)
                   add(new Label("Guest Check In"));
                   add(new Label("Last Name:"));
                   add(new TextField("  "));
                   add(new Label("First Name"));
                   add(new TextField("  "));
                   //add(buttGuestSave());
                   invalidate();
                   validate();
              if (e.getSource()==buttGuestSave)
         public void doRmGen()
                   int n;
                   n=y+1;
                   record[y].setRmNum(n);
                   System.out.println(record[y].getRmNum()+record[y].getRmType());
                   add(new Label("Room No. "+ n));
                   chooseRmType = new Choice();
                   chooseRmType.add("Taxi Room");
                   chooseRmType.add("Garage Room");
                   chooseRmType.add("Suite");
                   add(chooseRmType);
                   chooseRmType.addItemListener(this);     
    //               record[y].setRmRate(rmRate);                    
    //               record[y].setRmType(roomType);                         
                   add(buttSaveUpdate);
                   buttSaveUpdate.addActionListener(this);
                   invalidate();
                   validate();
                   buttSubmitRmQty.removeActionListener(this);
         public void itemStateChanged(ItemEvent ie)
                   ie.getItem();
                        if(chooseRmType.getSelectedItem().equals("Taxi Room"))
                             System.out.println(" Taxi Room.");
                             rmRate=taxiRate;
                             roomType="TAXI";
                        else if(chooseRmType.getSelectedItem().equals("Garage Room"))
                             System.out.println(" Garage Room.");
                             rmRate=garageRate;
                             roomType="GARAGE";
                        else if(chooseRmType.getSelectedItem().equals("Suite"))
                             System.out.println(" Suite Room.");
                             rmRate=suiteRate;
                             roomType="SUITE";
                   record[y].setRmRate(rmRate);                    
                   record[y].setRmType(roomType);
         public void doRecordArrays()
    public class Room
         private int rmN=0, rmR=0, custN=0;
         private String rmT="Taxi", custLN=" ", custFN=" ";
         private int rmO=0;
         public Room(int a, String b, int c, int d, int cust, String cLN, String cFN)
              rmN = a;
              rmT = b;
              rmR = c;
              rmO = d;
              custN = cust;
              custLN=cLN;
              custFN=cFN;
         public int getRmNum()
              return rmN;
         public String getRmType()
              return rmT;
         public int getRmRate()
              return rmR;
         public int getRmO()
              return rmO;
         public int getcustN()
              return custN;
         public String getcustLN()
              return custLN;
         public String getcustFN()
              return custFN;
         public void setRmNum(int rn)
              rmN = rn;
         public void setRmType(String rt)
              rmT = rt;
         public void setRmRate(int rr)
              rmR = rr;
         public void setRmO(int ro)
              rmO = ro;
         public void setcustN(int cn)
              custN = cn;
         public void setcustLN(String cl)
              custLN=cl;

    This program asks for the value of the room quantity, and from that value the room list is generated:
    ex: rmQty entered=3, it would create:
    Room 1
    Room 2
    Room 3
    Aside from the room numbers, it would also ask for the room type, with the use of choice options.
    Before, rooms 1-3 would all appear at once, but my choice object could only accept the value for room 3, and makes the rest of the rooms have the same room type. So what i did was remove the for loop and make an if statement at the button's action listener(see buttSaveUpdate).
    The problem now is that i cant seem to make the program accept values until room 2, and room 3 automatically gets the default value i gave it. If i make the room quantity 5, same thing happens until room 3, and jumps to room 4, and then again sets the default value for room 5.

  • Query/Looping Problem

    I have a database table with columns as follows.
    racerID
    race1
    race2
    race3
    race4
    race5
    race30
    totalScore
    I do my query as follows:
    SELECT *
    FROM races
    WHERE racerID = URLVar
    I want so loop through the query results to list the points
    by race... my problem is that they are all in one record...
    I tried these:
    <cfloop index="i" from="1" to ="30">
    <p>#races.race#i##</p>
    </cfloop>
    I also tried using square brackets around i at the end of
    races.race...
    How can i reverence a field name using i?
    All help is appreciated. I have had this problem on more than
    one site i have done and i have always just broke down and typed
    all the code out for each field, but there has to be an easier
    way.

    Just from what you have listed, this seems to be a bad data
    model design. What happens if you add another race? You would have
    to add another column to your table. You might consider having a
    racer table, with all of the attributes associated with a racer, a
    race table with all of the attributes associated with a race, then
    an "associative entity" (link table) to link race with racer. This
    race_racer table would have the ID for the racer, and the ID for a
    given race, and the points for that race and racer so that you
    could find race info for any particular racer of race by joining
    these tables. Then it would be a snap to list the points by race or
    racer using SQL and not having to use outside loops, etc. In other
    words, normalize your data.
    <edit> looks like Dan beat me to it </edit>
    Phil

  • WHERE clause in a SMARTFORM loop, problems with parenthesis

    Hi all gurus,
    a simple question: I'm coding a LOOP in the form builder for a smartform ... this simple loop should bind text elements to every position of a purchase order. The WHERE clause should be as follows:
    WHERE GUID = WA_ITEM-GUID
    AND ( TDID EQ 'ZDES' OR TDID EQ 'ZDST' ).
    Anyway, in the Form Builder I didn't find a way to add parenthesis; I workarounded the problem with the following query:
    (conditions in lines are in AND conjunction)
    GUID EQ     WA_ITEM-GUID
    TDID      EQ   'ZDES'
    OR
    GUID EQ     WA_ITEM-GUID                                                                               
    TDID      EQ 'ZDST'.
    It's quite a 'bad' way, but it works. I wonder if there's a way to express "complex" WHERE clauses (with addiction of parenthesis) in Form Builder.
    Thanks in advance

    In this case, your solution is the one that works. However in more complex cases with more variables, this can proove difficult to make or mantain.
    What I usually do is use the first part of the condition in the where and then add a condition to the printing area with the rest of the formula. Just remember to document this so that you'll find it easy and it's way more amintainable.
    In this case the loop would contain WHERE GUID = WA_ITEM-GUID and the inside condition TDID EQ 'ZDES' OR TDID EQ 'ZDST. This creates the and between the two blocks.

  • Submit Statment inside Loop - Problem in display O/P

    Hi All,
              Iam Using Submit statment inside the Loop with Return , when the first line in the loop completes the O/P gets display and the Second line is not processed and get in O/P.Can any one let me know why this problem occurs?...
    Regards,
    Veera

    when You submit for a report it starts a parallel process and it is O/P then if you are doign it in loop it may be over writing the existing O/P that may be the reason you are not seeing the out put properly as it is written across different internalk sessions

Maybe you are looking for