| File f = new File(dumpfile);
if (!f.exists()) {
prop.put("import", 2);
prop.put("import_error", "file " + dumpfile + " does not exist");
} else try {
ImportDump importer = new ImportDump(
dbtype,
dbhost,
dbport,
dbname,
dbuser,
dbpw
);
importer.imp(f);
prop.put("import", 1);
importer.close();
} catch (Exception e) {
Log.logException(e);
prop.put("import", 2);
prop.put("import_error", e.getMessage());
}
|