version 1.83, 2004/10/26 08:37:10
|
version 1.84, 2004/10/28 08:44:04
|
Line 506 class Convert
|
Line 506 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 845 class Convert
|
Line 847 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 864 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 943 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)+" |