version 1.8, 2004/01/15 08:01:58
|
version 1.9, 2004/01/15 08:27:09
|
Line 61 class Convert
|
Line 61 class Convert
|
System.out.println("Finished!"); |
System.out.println("Finished!"); |
//convert("jdbc:fmpro:http://141.14.237.74:8050","jdbc:postgresql://erebos/test",null,null); |
//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); |
/*FM2SQL.ProgressDialog dialog = new FM2SQL.ProgressDialog(FM2SQL.fmInstance); |
dialog.setTitle("Conversion running ..."); |
dialog.setTitle("Conversion running ..."); |
Line 139 class Convert
|
Line 139 class Convert
|
// System.out.println(beanDest.getTableNames(beanDest.getCatalogs().get(2).toString())); |
// System.out.println(beanDest.getTableNames(beanDest.getCatalogs().get(2).toString())); |
stm = beanDest.getConnection().createStatement(); |
stm = beanDest.getConnection().createStatement(); |
// System.exit(0); |
// System.exit(0); |
if(true) |
if(mode==Convert.DataBase.CONVERT_MODE) |
{ |
{ |
if(tables.indexOf(names.get(tbIndex))>=0) |
if(tables.indexOf(names.get(tbIndex))>=0) |
{ |
{ |
Line 891 class Convert
|
Line 891 class Convert
|
for (Iterator iter = databases.iterator(); iter.hasNext();) |
for (Iterator iter = databases.iterator(); iter.hasNext();) |
{ |
{ |
DataBase db = (DataBase) iter.next(); |
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); |
// printContents(node3); |