Diff for /FM2SQL/Attic/Convert.java between versions 1.83 and 1.85

version 1.83, 2004/10/26 08:37:10 version 1.85, 2004/10/29 10:28:10
Line 398  class Convert Line 398  class Convert
                 }                  }
                 catch (Exception e)                  catch (Exception e)
                 {                  {
                       System.out.println("Warning exception occured \n " + e);
   
                     continue;                      continue;
                 }                  }
                 // determine destTableName from createStatement or from source                  // determine destTableName from createStatement or from source
Line 506  class Convert Line 508  class Convert
         catch (Exception e)          catch (Exception e)
         {          {
             System.out.println("Error while connecting to database " + e);              System.out.println("Error while connecting to database " + e);
             if (dialog != null)              if (isGUI)
             {              {
                 dialog.setVisible(false);                  dialog.setVisible(false);
                 dialog.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));                  dialog.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
                 FM2SQL.fmInstance.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));                  FM2SQL.fmInstance.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
             }  
             java.io.ByteArrayOutputStream b = new java.io.ByteArrayOutputStream();              java.io.ByteArrayOutputStream b = new java.io.ByteArrayOutputStream();
             java.io.PrintStream stream = new java.io.PrintStream(b);              java.io.PrintStream stream = new java.io.PrintStream(b);
             stream.print(command + "\n\n");              stream.print(command + "\n\n");
             e.printStackTrace(stream);              e.printStackTrace(stream);
             if(dialog!=null)  
             FM2SQL.showErrorDialog(b.toString(), "Error occured !");              FM2SQL.showErrorDialog(b.toString(), "Error occured !");
               }
               else
               {
                   e.printStackTrace();
   
         }          }
         if (dialog != null)          }
           if (isGUI)
         {          {
             dialog.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));              dialog.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
             FM2SQL.fmInstance.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));              FM2SQL.fmInstance.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
   
             dialog.setVisible(false);              dialog.setVisible(false);
         }          }
   
Line 632  class Convert Line 636  class Convert
                 }                  }
                 catch (Exception e)                  catch (Exception e)
                 {                  {
                     System.out.println(e);                      System.out.println("Warning exception occured \n "+e);
                       
                     continue;                      continue;
                 }                  }
                 if (destination != null)                  if (destination != null)
Line 845  class Convert Line 850  class Convert
         catch (Exception e)          catch (Exception e)
         {          {
             System.out.println("Error while connecting to database " + e);              System.out.println("Error while connecting to database " + e);
             if (dialog != null)              if (isGUI)
             {              {
                 dialog.setVisible(false);                  dialog.setVisible(false);
                 dialog.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));                  dialog.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
Line 862  class Convert Line 867  class Convert
   
             }              }
         }          }
         if (dialog != null)          if (isGUI)
         {          {
             dialog.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));              dialog.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
             FM2SQL.fmInstance.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));              FM2SQL.fmInstance.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
Line 941  class Convert Line 946  class Convert
             }              }
             pstm.execute();              pstm.execute();
             //stm.executeUpdate(command.toString());              //stm.executeUpdate(command.toString());
             if (dialog != null)              if (isGUI)
                 dialog.progress.setValue((int) (((double) (j + 1) / (double) rowCount) * 100.0));                  dialog.progress.setValue((int) (((double) (j + 1) / (double) rowCount) * 100.0));
             // System.out.println(              // System.out.println(
             // (int)(((double)(j+1)/(double)result[0].size())*100.0)+"              // (int)(((double)(j+1)/(double)result[0].size())*100.0)+"
Line 2147  class Convert Line 2152  class Convert
                 }                  }
                 catch (Exception e)                  catch (Exception e)
                 {                  {
                       System.out.println("Warning exception occured \n "+e);
                       
                     continue;                      continue;
                 }                  }
                 // determine destTableName from createStatement or from source                  // determine destTableName from createStatement or from source
Line 2399  class Convert Line 2406  class Convert
     }      }
   
     private static void performSynchronize(String idField, Vector vec, String tempQuery, TreeSet linesToDelete, TreeSet linesToAppend, PreparedStatement insPst, PreparedStatement updPst,      private static void performSynchronize(String idField, Vector vec, String tempQuery, TreeSet linesToDelete, TreeSet linesToAppend, PreparedStatement insPst, PreparedStatement updPst,
             PreparedStatement delPSt, int deltaID, String delimiter, FM2SQL.ProgressDialog dialog) throws SQLException, ParseException              PreparedStatement delPSt, int deltaID, String delimiter, FM2SQL.ProgressDialog dialog) throws SQLException, ParseException,Exception
     {      {
         if (dialog != null)          if (dialog != null)
         {          {

Removed from v.1.83  
changed lines
  Added in v.1.85


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>