|
|
| version 1.28, 2004/03/09 12:34:09 | version 1.29, 2004/03/12 11:48:57 |
|---|---|
| Line 739 public class FM2SQL extends JFrame imple | Line 739 public class FM2SQL extends JFrame imple |
| }; | }; |
| thread.start(); | thread.start(); |
| } | } |
| if (command.equals("Delete Tables")) | |
| { | |
| Thread thread = new Thread() | |
| { | |
| public void run() | |
| { | |
| setEnabled(false); | |
| delete(); | |
| setEnabled(true); | |
| } | |
| }; | |
| thread.start(); | |
| } | |
| if (command.equals("show Tables")) | if (command.equals("show Tables")) |
| { | { |
| Line 832 public class FM2SQL extends JFrame imple | Line 847 public class FM2SQL extends JFrame imple |
| } | } |
| } | } |
| public void delete() | |
| { | |
| Vector vectors[] = getListFromTable(); | |
| Convert.user = bean.user; | |
| Convert.passwd = bean.passwd; | |
| Convert.userDest = destBean.user; | |
| Convert.passwdDest = destBean.passwd; | |
| try | |
| { | |
| fmInstance.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); | |
| fmInstance.setEnabled(false); | |
| Convert.delete(bean.url, destURLBox.getSelectedItem().toString(), vectors[0], vectors[1], vectors[2], vectors[3],vectors[4], mode); | |
| destBean.setConnection((String) destURLBox.getSelectedItem()); | |
| DefaultListModel model = new DefaultListModel(); | |
| tables = destBean.getTableNames(); | |
| for (int j = 0; j < tables.size(); ++j) | |
| model.addElement(tables.get(j)); | |
| if (debug) | |
| System.out.println("hallo" + tables + " "); | |
| tListDest.setModel(model); | |
| fmInstance.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); | |
| } catch (Exception e4) | |
| { | |
| ByteArrayOutputStream b = new ByteArrayOutputStream(); | |
| PrintStream stream = new PrintStream(b); | |
| e4.printStackTrace(stream); | |
| showErrorDialog(b.toString(), "Update of table failed"); | |
| fmInstance.setEnabled(true); | |
| } | |
| } | |
| /** | /** |
| * Copys the content of source to destination and makes new table if necessary | * Copys the content of source to destination and makes new table if necessary |
| */ | */ |