Using one query two times

Hi i have a system that control car acidents ..
I have a query that return the streets from a choosed city, and after i ask if the crash happens in streets crossings,
So i get the variable $street
If so i do the same query to return the same streets to the user choose the street crossing.
So i get the variable $street_crossing
I only need assign diferent variables names to handle the street and the street crossing.
Is there any way to not go to the database to do the same work that already is done? and get the previous query result ? i am using php and oracle
thanks in advance

After the query, the street list is in $results_crzmt_logr. You
should be able to print this array twice. The first time with
headings for "Street" and the second time for "Street Crossing".
For performance reasons the query may benefit from a bind variable.
Something like:
    $cmdstr_crzmt_logr = "SELECT NOME, ".
    "B, ".
    "CEP, ".
    "FROM TABLE ".
    "WHERE MUNIC=:mun ".
    "ORDER BY NOME ASC";
    $parsed_crzmt_logr = ociparse($db_conn, $cmdstr_crzmt_logr);
    OCIBindByName($parsed_crzmt_logr, ":mun", $_POST[MUN_CODIGO], 10);
    ociexecute($parsed_crzmt_logr);
    $nrows_crzmt_logr = ocifetchstatement($parsed_crzmt_logr, $results_crzmt_logr);Adding error checking may be useful. The free statement should be:
    OCIFreeStatement($parsed_crzmt_logr);-- CJ

Similar Messages

  • Two different results using one query

    Hi Friends
    Oracle version that I am using is : Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    I have a scenario where one account can be related to two customers. Hence, in table have many rows for one account. Here’s the sample data:
    Account_ID | product_code | cust_id | relationship_code | entity_code
    1111 | ABC | 1234 | SOL | CUST
    1111 | ABC | 2222 | ZZZ | LINK
    1111 | ABC | 4455 | ABC | LINK
    2222 | ABC | 7890 | SOL | CUST
    2222 | ABC | 5678 | ZZZ | LINK
    3333 | JFK | 5878 | TST | CUST
    3333 | JFK | 3254 | PRI | CUST
    3333 | JFK | 3299 | PRI | CUST
    4444 | JFK | 2535 | SOL | CUST
    4444 | JFK | 4565 | SOL | CUST
    5555 | DEF | 6666 | PRI | CUST
    5555 | DEF | 6667 | TST | CUST
    5555 | DEF | 9667 | TST | CUSTIn this scenario, I need two outputs differently:
    Output 1: When an account has relationship_code = ‘SOL’ then take the least cust_id
    1111 | ABC | 1234 | SOL | CUST
    2222 | ABC | 5678 | ZZZ | LINK
    4444 | JFK | 2535 | SOL | CUST Output 2: else take the highest cust_id
    3333 | JFK | 5878 | TST | CUST
    5555 | DEF | 9667 | TST | CUSTHow can I get this result using one query?

    Not sure what you mean. Works OK:
    SQL> with t as (
      2             select 1111 account_ID,'ABC' product_code,1234 cust_id,'SOL' relationship_code,'CUST' entity_code from dual union all
      3             select 1111,'ABC',2222,'ZZZ','LINK' from dual union all
      4             select 1111,'ABC',4455,'ABC','LINK' from dual union all
      5             select 2222,'ABC',7890,'SOL','CUST' from dual union all
      6             select 2222,'ABC',5678,'ZZZ','LINK' from dual union all
      7             select 3333,'JFK',5878,'TST','CUST' from dual union all
      8             select 3333,'JFK',3254,'PRI','CUST' from dual union all
      9             select 3333,'JFK',3299,'PRI','CUST' from dual union all
    10             select 4444,'JFK',2535,'SOL','CUST' from dual union all
    11             select 4444,'JFK',4565,'SOL','CUST' from dual union all
    12             select 5555,'DEF',6666,'PRI','CUST' from dual union all
    13             select 5555,'DEF',6667,'TST','CUST' from dual union all
    14             select 5555,'DEF',9667,'TST','CUST' from dual union all
    15             select 6666,'XYZ',8877,'SOL','CUST' from dual
    16            )
    17  select  account_ID,
    18          product_code,
    19          cust_id,
    20          relationship_code,
    21          entity_code
    22    from  (
    23           select  account_ID,
    24                   product_code,
    25                   cust_id,
    26                   relationship_code,
    27                   entity_code,
    28                   case max(case relationship_code when 'SOL' then 1 else 0 end) over(partition by account_ID)
    29                     when 1 then dense_rank() over(partition by account_ID order by cust_id)
    30                     else dense_rank() over(partition by account_ID order by cust_id desc)
    31                   end rnk
    32             from  t
    33          )
    34    where rnk = 1
    35  /
    ACCOUNT_ID PRO    CUST_ID REL ENTI
          1111 ABC       1234 SOL CUST
          2222 ABC       5678 ZZZ LINK
          3333 JFK       5878 TST CUST
          4444 JFK       2535 SOL CUST
          5555 DEF       9667 TST CUST
          6666 XYZ       8877 SOL CUST
    6 rows selected.
    SQL> SY.

  • Why JRC executes query two times? (reports.queryengine(?:?) - Executing query: ...)

    Hello! Using JRC. While creating the report for viewing, I noticed one interesting thing. Why JRC executes query two times AND first time is executed with default parameters AND if default parameters are NULL the query can be invalid (even if it is marked to convert all database NULLs to defaults in Report Options).
    <!break>
    1. Why do you need to execute query the first time with these default parameters, which are later set to the others? We need to make some valid default parameters to make everything work. Also it is not efficient to execute unnecessary query.
    2. If I'm wrong could you explain please? If I'm right, is it a bug and when do you fix it?
    Waiting for answer,
    Anton Stalnuhhin
    Java-developer, Webmedia AS

    .

  • I have created a new partition on the Mac HD for Lion as I would like to dual boot. Do I need to install Snow Leopard on that partition before installing Lion? If so, can I use one of my Time Machine backups to do this?

    I have created a new partition on the Mac HD for Lion as I would like to dual boot. Do I need to install Snow Leopard on that partition before installing Lion? If so, can I use one of my Time Machine backups to do this?

    zoominnana wrote:
    Can I set up 2 different time capsule backups? one for the lion partition and one for the snow leopard partition?
    No, you can't partition a Time Capsule's internal HD.  Both partitions will back up to the same sparse bundle. keeping the backups for each partition separate.
    Time Machine will not take the two OSX partitions as two different computers, but for best results, exclude the Snow Leopard drive from backups on the Lion partition, and exclude the Lion partition from backups on the Snow Leopard partition.
    There may be some files on the Lion partition that Time Machine on Snow Leopard won't like, among other things.  See #10 in  Time Machine - Frequently Asked Questions for details.

  • How to use one query results in another query

    hi,
    in help.sap I have founded that using variable type replacement path I can use one query results in another query. It is wrote there that I have to choose query name results I want to get in variable definition but I do not know where.
    How I can do this?
    Result I want to get is:
    In one query I have material prices in another material quantities. I want to calculate inventory value (price * quantity). Moreover prices are on plant level, quantities on storage type level. Plant is atribute of storage type.
    Can I do this?
    Regards,
    Andrzej

    Hi Andrzej,
    please check out this thread: Set parameters values depending on other parameters
    I had a discussion about query results as input for another query in there.
    For creating a workbook, just click on the save button after you ran your query in the bex.
    Siggi
    Message was edited by: Siegfried Szameitat

  • How to use ONE query to find out tree structure?

    ID------------upperID----------Name------------------------isFolder
    1------------ 0---------- Folder
    1------------------------------------1
    2------------ 1------------ Folder 1- Sub
    Folder--------------------1
    3------------ 2------------
    Folder1-Item1-A--------------------------0
    4------------ 1------------ Folder 1- Sub
    Item-----------------------0
    Hi all, if I have a table like above to demonstrate the
    folders and item relationship. This structure allows the user to
    create unlimited folders and items.
    Now I would like to use one query to find out the tree
    structure of this table, how could I do the query.
    Any help on this will be highly appreciated!
    Thanks,
    ez

    Also, see this thread:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=1&catid=7&threadid=12 55788&enterthread=y

  • 2 atv's both have home sharing enabled but one asks to turn on home sharing on my pc but it is on so can only use one at a time to watch movies from my computer

    2 atv's both have home sharing enabled but one asks to turn on home sharing on my pc, but it is enabled on pc so I  can only use one at a time to watch movies from my computer

    Both atv,s are on the same network, they are wirless and the computer can see them and they are named different.
    what ever one i switch on first gets to stream from my computer and the other one asks for home sharing to be switched on, then if i switch both off and start the other one first it gets to stream and the other one which worked asks for home sharing to be turned on. i have hidden all functionality, netflix etc as these are for my 7yr old kids.

  • When I set up my iMac I used one of two iTunes accounts I have, I now need to change it to the other one......any ideas?! Thanks in advance

    When I set up my iMac I used one of two iTunes accounts I have, I now need to change it to the other one......any ideas?! Thanks in advance

    Hi Pompey Woody,
    Thanks for visiting Apple Support Communities.
    If you need to use a different Apple ID (iTunes Store account) with iTunes on your Mac, you can sign out and then back in with the other account:
    Open iTunes. ...select Store > Sign Out, then select Store > Sign In and enter your current Apple ID.
    These steps are found in this article:
    Apple ID: What to do after you change your Apple ID
    http://support.apple.com/kb/HT5796
    You may also find the information in this article helpful:
    Using your Apple ID for Apple services
    http://support.apple.com/kb/ht4895
    Best,
    Jeremy

  • Why do I need to reflesh one, to two times just to view a webpage properly?

    Every time I visit a page, I have to refresh one, to two times before the page is able to be viewed properly. This happens on other computers, and other internet connections. How can I make it so the webpage is exactly as it should be the first time around? When I go to a page, I get the "basic" text version. Once I refresh, all the formatting, videos, and pictures will be up.

    import java.awt.;
    import javax.swing.;
    import java.awt.datatransfer.*;
    import java.io.FileReader;
    import java.io.IOException;
    import java.awt.event.MouseListener;
    import java.awt.event.MouseEvent;
    public class Main extends JPanel implements MouseListener {
    public Main() {
    super(new GridLayout(2,2));
    final JTextArea jt= new JTextArea("dear test :) ",5,20);
    FileReader reader = null;
    System.err.println("Error closing reader");
    exception.printStackTrace();
    JButton bu = new JButton("copiar");
    final Clipboard clipboard = getToolkit().getSystemClipboard();
    //new add
    add(nn);
    add(tt);
    bu.addMouseListener(new MouseListener() {
    public void mouseEntered(MouseEvent e) {
    StringSelection data = new StringSelection(jt.getText());
    clipboard.setContents(data, data);
    public void mouseClicked(MouseEvent e) { }
    public void mousePressed(MouseEvent e) { }
    public void mouseReleased(MouseEvent e) {}
    public void mouseExited(MouseEvent e) { }
    private static void createAndShowGUI() {
    //Create and set up the window.
    JFrame frame = new JFrame("TextDemo");
    public static void main(String[] args) {
    //Schedule a job for the event dispatch thread:
    //creating and showing this application's GUI.
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    createAndShowGUI();
    public void mouseClicked(MouseEvent e) { }
    public void mousePressed(MouseEvent e) { }
    public void mouseReleased(MouseEvent e) { }
    public void mouseEntered(MouseEvent e) { }
    public void mouseExited(MouseEvent e) { }
    } the problem is this line bu.addMouseListener(new MouseListener() {
    if i change this to bu.addMouseListener(this() {
    it gives error saying expected ')'
    and then doesn't compile.
    i just don't know why , although the program runs when i declare the methods two times,
    but i think it's better java code , if i learn it why is this error and correct it

  • I am setting up a time machine backup to a external Hard drive.  I want to backup by Mac book Pro running OSX 10.8.5. I would like to Partition the disk and use one partition for Time machine backups and the other for my Lightroom backups. How to do this?

    I want to create a two partition disk. One partition for time machine, the other for Lightroom backup. Currently Time Machine is using the entire drive and it is doing the intial encryption and is about 29% complete after two days.  I've decided that I want to turn encryption off and partition the disk. So I do I start over?

    With the external drive attached, open Finder>Applications>Utilities>Disk Utility.  Select the external drive from the list in the left side panel of the DU window.  In the main window panel, click Partition in the buttons top center of that panel.
    Select the number of partitions you want and adjust their sizes.
    For the first partition, click to highlight the partition, then select the format, Mac OS Extended (Journaled) and then the partition table as GUID [both of those are the defaults].  Click Apply and it will ask to confirm and erase and format that partion...oh, give the partition a name, like Backup. 
    Then repeat those steps for the second partition..and remember to name it...something like Lightroom.
    Close Disk Utilitty and you are ready to send TM to the one partition, and do your backup of Lightroom to the second partition.

  • Only firefox executing mysql query two times. but other browser works perfect why?

    i am a web developer. and i am facing a problem only with firefox. every time i use MySQL query in my php code fire fox execute it two times. but same query is working fine on other browsers.

    Yes, the problem is seen without extensions and also in safe mode.
    But, I am starting to think that firefox is running low on memeory or CPU.
    Without extensions the possibility of failing is 1 in 3.
    I am still unable to explain why closing the browser or aborting the request can cause the stuck request to immediately reach the server.
    Is there a way to collect Firefox logs and post it here ?

  • One query two different Group By

    In My parameter two option one and two.
    if i select one, need to come this group by:-
    GROUP BY
    Name1,
    Name2,
    Country,
    MCC || '/' | MNC
    One Output:
    Name1 -  Name2 - Country  - PNR
    if i select two, need to come this group by
    GROUP BY
    Name1,
    Country,
    MCC || '/' | MNC
    two output :
    Name1 - Country - PNR
    I have only one sql query But i have two different group by
    Please advise me, m not using subreport option.
    whether any formulas or any other options for group by.

    Try inserting the groups statically that are common for both the parameaters like this
    GROUP BY
    Name1,
    Country,
    MCC || '/' | MNC
    and now create a formula like this
    whilereadingrecords;
    if =1 then
    {Name2 field}
    else
    Now insert one more group using this formula and move the group to second level by using group options.
    Hope this helps!
    Raghavendra

  • Getting Records Returned When Criteria Doesn't Match (Using One Query)

    I have made two queries which I would like to fold into one query if possible. The first query includes all grp_id's. The second query updates grp_id's with an (active) member count. This second query has criteria in it that grabs only grp_id's that have active members. This would be similar to say, for example, a left join situation where everything is returned from table A and only those matching from table B.
    The problem is that if I put these together, they have to be linked by grp_id, so obvioulsy, if I put these queries together, the only grp_id's I will get back are the ones that have active members in them, but as I mentioned, I need all grp_id's to be shown regardless of any active membership.
    So, here is the code that doesn't work to give a better idea of what I want.
    select g00.grp_id,
    count(m06.subs_ssn)
    from gmaster g00
    join m_elig m06 on
    g00.grp_id = m06.grp_id
    and m06.eff_date < sysdate
    and m06.exp_date > sysdate
    and m06.stat_code = 'ACTIVE'
    group by g00.grp_id
    Again, this will only give me counts for grp_id's with active members in them, whereas I want all grp_id's shown and those grp_id's without active members to have a zero next to the count..
    m06 gives the member data and g00 gives the grp_id data. The m06 eff_date and exp_date and stat_code as shown above determine active members..
    Thanks for any suggestions..

    I don't know why its not working. I did make an error in the intial posting of the data which was to put NOAM in grpid 'C'. I thought this might be my error, but I corrected it and am still getting the same results.
    I have repasted the DDL statements, the query I'm using, the results and also the data as it shows when I query the two tables. (my query is based off the tables created using the posted DDL).
    I also posted QUERY B. Which shows that the removal of the eff_dt and exp_dt criteria allows grp_id to be posted in the results, obviously showing 1 record as I no longer am defining an ACTIVE member by having criteria as posted in QUERY A.
    Is my LEFT OUTER JOIN statement written correctly?
    Also of note: I could not insert the data without the apostrophes in the dates. It gave me an error (Column not allowed here). Using the apostrophes eliminates this message and allows the data insertion. At least for now its not causing an issue as the data shows correct when I query it based a simple query of the dates.
    Using PL/SQL don't know if that makes a difference..?
    =======================================================
    DATA IN TBL: GRP_ID:
    1     A
    2     B
    3     C
    4     D
    DATA IN TBL: MBR
    1     MARK     A     Y     1/1/2011     7/1/2011
    2     MARK     A     Y     7/1/2011     1/1/2012
    3     MARTY     A     Y     1/1/2011     7/1/2011
    4     MARTY     A     Y     7/1/2011     1/1/2012
    5     FRANK     B     Y     1/1/2011     7/1/2011
    6     FRANK     B     Y     7/1/2011     1/1/2012
    7     MARY     B     Y     1/1/2011     7/1/2011
    8     MARY     B     Y     7/1/2011     1/1/2012
    9     JEAN     C     Y     1/1/2011     7/1/2011
    10     JEAN     C     Y     7/1/2011     1/1/2012
    11     NOAM     D     Y     1/1/2011     7/1/2011
    As you can see, Mark, Marty should have 1 active record in grp_id 'A' (total 2), Frank and Mary should have 1 active record each 'B' (total 2), Jean should have 1 active record in 'C' grp_id, total 1) and Noam should have no active records.
    ====================================
    QUERY A:
    SELECT
    g00.grpid,
    count(m00.grpid) mbr_count
    FROM
    grp_id g00
    left outer join mbr m00 on
    g00.grpid = m00.grpid
    WHERE
    m00.eff_dt < sysdate
    AND
    m00.exp_dt > sysdate
    GROUP BY
    g00.grpid
    QUERY A RESULTS
    1     A     2
    2     B     2
    3     C     1
    QUERY B
    SELECT
    g00.grpid,
    count(m00.grpid) mbr_count
    FROM
    grp_id g00
    left outer join mbr m00 on
    g00.grpid = m00.grpid
    GROUP BY
    g00.grpid
    QUERY B RESULTS:
    1     A     4
    2     B     4
    3     C     2
    4     D     1
    =================================================
    DDL STATEMENTS
    create table mbr (mbr_name varchar(10), grpid varchar(1), stat varchar(1), eff_dt date, exp_dt date)
    insert into mbr values ('MARK', 'A','Y', '01-jan-2011', '01-jul-2011')
    insert into mbr values ('MARK', 'A','Y','01-jul-2011', '01-jan-2012')
    insert into mbr values ('MARTY', 'A','Y','01-jan-2011', '01-jul-2011')
    insert into mbr values ('MARTY', 'A','Y', '01-jul-2011', '01-jan-2012')
    insert into mbr values ('FRANK', 'B','Y','01-jan-2011', '01-jul-2011')
    insert into mbr values ('FRANK', 'B','Y','01-jul-2011', '01-jan-2012')
    insert into mbr values ('MARY', 'B','Y','01-jan-2011', '01-jul-2011')
    insert into mbr values ('MARY', 'B','Y','01-jul-2011', '01-jan-2012')
    insert into mbr values ('JEAN', 'C','Y','01-jan-2011', '01-jul-2011')
    insert into mbr values ('JEAN', 'C','Y','01-jul-2011', '01-jan-2012')
    insert into mbr values ('NOAM', 'D','Y','01-jan-2011', '01-jul-2011')
    commit

  • Can multiple users use one drive for time machine

    I have an older G4 which I have put a 500mb drive into. I want to put it on the newtork and use it as a time machine. Do I need to partion the drive, such that each user has there own partition? Or just one large partition and allow users access?
    Thanks

    see if this user tip can help: http://web.me.com/pondini/Time_Machine/26.html
    JGG

  • One Click - two times the same event?

    Hello guys, i have a little problem...
    When I click on my button it seems to be that the event handler method is run two times. I cant understand why - its happening at all buttons. can anyone help me?
    GUI.java
    public void actionPerformed(ActionEvent event) {
    transmit();                  // transmit the textfields
    p.translate();               // translate it to xml
    html = p.newHTML();          // translate the xml to html
    status.setText("<html>"+html);  // set the translatet html in the preview panel
    taHtml.setText(html);  // set the translatet html in the text area     
    The problem is that it appears two times in both, the area and the label.
    Here is the other code, if it helps.
    public String newHTML() {
              String tmp = xMLToHTMLParser.translate(xml);
              return tmp;
    public String translate(String delivered) {
                   xml = delivered;
                   html += "<b>";
                   try {
                   html += xml.substring(xml.indexOf("<Headline>")+10, xml.indexOf("</Headline>"));
                   catch(Exception e) {}  // When nothing is in the Headline do nothing.
    html += "</p>\n \n";
                   return html;
              }Thnak you so much for you help!
    Toby

    Ok, here is the transmit():
        /** Transmits the content of the Textfields to the Parser */
        private void transmit() {
             String Logoname = phases[phaseChoices.getSelectedIndex()];
             p.setLogoURL("http://www.destinations2discover.com/images/icons/"+Logoname);  // All icons are already saved on the Server
             p.setHeadline(tfHeadline.getText());
             // It's very tricky to get the correct dates in :)
             // First Step: transfer the correct Items, for next Step see Parser.java
             if( !tfAdditional.getText().equalsIgnoreCase("" )) {
                  try {
                       p.setDateline(tfAdditional.getText());
                  catch(Exception e) {
                  p.setDateline ("T Y P E C A S T   E R R O R   IN   D A T E L I N E   A D D I T I O N A L");
             /*else*/ if(( (!tfStartDay.getText().equalsIgnoreCase("")) &&  (!tfStartMonth.getText().equalsIgnoreCase("")) &&  (!tfStartYear.getText().equalsIgnoreCase("" )) && (!tfEndDay.getText().equalsIgnoreCase("")) &&  (!tfEndMonth.getText().equalsIgnoreCase("")) &&  (!tfEndYear.getText().equalsIgnoreCase("")) )) {
                  try {
                  p.setDateline ( Integer.parseInt(tfStartDay.getText()), Integer.parseInt(tfStartMonth.getText()), Integer.parseInt(tfStartYear.getText()), Integer.parseInt(tfEndDay.getText()), Integer.parseInt(tfEndMonth.getText()), Integer.parseInt(tfEndYear.getText()) );
              catch(Exception e) {
                   p.setDateline ("T Y P E C A S T   E R R O R   IN   D A T E L I N E   S T A R T  /  E N D");
             else if(((!tfStartDay.getText().equalsIgnoreCase("")) &&  (!tfStartMonth.getText().equalsIgnoreCase("")) &&  (!tfStartYear.getText().equalsIgnoreCase("" )) ) ){
                  try {
                       p.setDateline ( Integer.parseInt(tfStartDay.getText()), Integer.parseInt(tfStartMonth.getText()), Integer.parseInt(tfStartYear.getText()) );
              catch(Exception e) {
                   p.setDateline ("T Y P E C A S T   E R R O R   IN   D A T E L I N E   S T A R T");
    //-->FIX::  Add Annual Event Checkbox      if(!btnAnnual.getText().equalsIgnoreCase("StartDay"))
             if(!tfImageURL.getText().equalsIgnoreCase("")) {
                  p.setImageURL(tfImageURL.getText());
             if(!tfText.getText().equalsIgnoreCase("")) {
                  //p.setText(tfText.getText());
                  p.setText(taTxt.getText());
             if(!tfHyperlink.getText().equalsIgnoreCase("")) {
                  p.setHyperlinkURL(tfHyperlink.getText());
        }And here is the whole actionPerformed - just to make sure i have the listener not twice.
    public void actionPerformed(ActionEvent event) {
            if ("comboBoxChanged".equals(event.getActionCommand())) {
                //Update the icon to display the new phase.
                phaseIconLabel.setIcon(images[phaseChoices.getSelectedIndex()]);
            // Set the article ID from the radio buttons
            else if (event.getSource() == rbFOM) {
                p.setID(1);
            else if (event.getSource() == rbInsider){
                 p.setID(2);
            else if (event.getSource() == rbMustSee){
                 p.setID(3);
            else if (event.getSource() == rbMustDo){
                 p.setID(4);
            else if (event.getSource() == rbMustExperience){
                 p.setID(5);
            else if (event.getSource() == rbActivity){
                 p.setID(6);
            else if (event.getSource() == sendContent) {
                 transmit();                  // transmit the textfields
                 p.translate();               // translate it to xml
                 html = p.newHTML();          // translate the xml to html
                 status.setText("<html>"+html);  // set the translatet html in the preview panel
                 taHtml.setText(html);  // set the translatet html in the text area     
                 // write in html in line.html and xml in line.xml file
                 try  {
                 FileOutputStream fos = new FileOutputStream( "line.html" );
                fos.write( html.getBytes() );
                fos.close();
                catch ( Exception e ) { System.out.println(e); }
                xml = p.getXML();
                try  {
                 FileOutputStream fos2 = new FileOutputStream( "line.xml" );
                fos2.write( xml.getBytes() );
                fos2.close();
                catch ( Exception e ) { System.out.println(e); }
                show = true;     // workaround
            else if (event.getSource() == addContent) {
                 transmit();                  // transmit the textfields
                 p.translate();               // translate it to xml
                 html = p.newHTML();          // translate the xml to html
                 status.setText("<html>"+html);  // set the translatet html in the preview panel
                 taHtml.setText(html);  // set the translatet html in the text area     
                 // write in html in line.html and xml in line.xml file
                 try  {
                 FileOutputStream fos = new FileOutputStream( "line.html" );
                fos.write( html.getBytes() );
                fos.close();
                catch ( Exception e ) { System.out.println(e); }
                xml = p.getXML();
                try  {
                 FileOutputStream fos2 = new FileOutputStream( "line.xml" );
                fos2.write( xml.getBytes() );
                fos2.close();
                catch ( Exception e ) { System.out.println(e); }
                show = true;
            else if (event.getSource() == showInIE) {
                 if(show) {   // workaround
                 try  {
                      File fd= new File("");
                    path = fd.getAbsolutePath();
                    path = "C:\\Program Files\\Internet Explorer\\iexplore.exe "  + path +  "\\line.html";
                    System.out.println(path);  // debug
                      //     Runtime.getRuntime().exec("C:\\Program Files\\Internet Explorer\\iexplore.exe \"C:\\Dokumente und Einstellungen\\intern\\Eigene Dateien\\code kopie\\text2XML\\text2Destination\\line.html\"");
                      Runtime.getRuntime().exec(path);
                 catch ( Exception e ) { System.out.println(e); }
                 show = false;   // workaround
                 showInIE.disable();
                 else if(show = false) {  // workaround
                      show = true;   // workaround
            }This problem is not only at the Button with "sendContent" it is also with "addContent' and "showInIE".
    Thank you two.

Maybe you are looking for

  • HP PSC 2510 duplex printing problem

    Hi, I have just installed a new Archlinux computer and configured my HP PSC 2510. However I can't print in duplex mode. I have installed cups and hplip and configured with the correct driver the printer (the one proposed by cups ...2510...) I have en

  • How to run the runallocation function with following scenario

    the cost center 123  has the following property and value property name      CC_PER     CC1     CC1_PER     CC2     CC2_PER value                                80              456              60                  789                40 CC_per contain

  • The printing on the web page overlap, making it difficult to make a selection

    The script lines on web pages overlap.

  • Clearing radio button selection

    Guys, iam stuck in a situation where iam not able to clear the radio button selection in the SINGLESELECT tableview. I am using MVC approach and my layout is similar to bookshop example in SAP  tutorial_4_mvc. I found that even in the SAP example the

  • OSB Cloud crashes with call stack : kbhsxmDestroyNode - kbhscaDoCleaning

    RMAN Backup using OSB Cloud is failing with the following errors in the alert.log : ORA-07445: exception encountered: core dump [kbhsxmFreeNode()+26] [SIGSEGV] [ADDR:0x2700000009] [PC:0x2AFD2527545E] [Address not mapped to object] [] ----- SQL Statem