--- FM2SQL/Attic/Convert.java 2004/01/12 13:22:36 1.5 +++ FM2SQL/Attic/Convert.java 2004/01/15 08:27:09 1.9 @@ -61,7 +61,7 @@ class Convert System.out.println("Finished!"); //convert("jdbc:fmpro:http://141.14.237.74:8050","jdbc:postgresql://erebos/test",null,null); } - public static void convertBatch(DBBean source,DBBean destination,Vector names,Vector layouts,Vector selects,Vector creates) throws Exception + public static void convertBatch(DBBean source,DBBean destination,Vector names,Vector layouts,Vector selects,Vector creates,int mode) throws Exception { /*FM2SQL.ProgressDialog dialog = new FM2SQL.ProgressDialog(FM2SQL.fmInstance); dialog.setTitle("Conversion running ..."); @@ -139,7 +139,7 @@ class Convert // System.out.println(beanDest.getTableNames(beanDest.getCatalogs().get(2).toString())); stm = beanDest.getConnection().createStatement(); // System.exit(0); - if(true) + if(mode==Convert.DataBase.CONVERT_MODE) { if(tables.indexOf(names.get(tbIndex))>=0) { @@ -307,7 +307,7 @@ class Convert - public static void convert(String source,String destination,Vector names,Vector layouts,Vector selects,Vector creates) throws Exception + public static void convert(String source,String destination,Vector names,Vector layouts,Vector selects,Vector creates,int mode) throws Exception { FM2SQL.ProgressDialog dialog = new FM2SQL.ProgressDialog(FM2SQL.fmInstance); dialog.setTitle("Conversion running ..."); @@ -377,7 +377,7 @@ class Convert // System.out.println(beanDest.getTableNames(beanDest.getCatalogs().get(2).toString())); stm = beanDest.getConnection().createStatement(); // System.exit(0); - if(true) + if(mode==Convert.DataBase.CONVERT_MODE) { if(tables.indexOf(names.get(tbIndex))>=0) { @@ -627,6 +627,8 @@ class Convert alterMe.delete(j, j); length--; } + else + alterMe.setCharAt(j,'_'); } ++j; @@ -889,7 +891,7 @@ class Convert for (Iterator iter = databases.iterator(); iter.hasNext();) { DataBase db = (DataBase) iter.next(); - convertBatch(db.bean,database,db.tables,db.layouts,db.selects,db.creates); + convertBatch(db.bean,database,db.tables,db.layouts,db.selects,db.creates,mode); } // printContents(node3);