version 1.15, 2005/09/22 12:24:30
|
version 1.17, 2006/10/04 20:37:52
|
Line 137 class Convert
|
Line 137 class Convert
|
|
|
static Vector postSQLCommands = new Vector(); |
static Vector postSQLCommands = new Vector(); |
|
|
static final String versionID = new String("FM2SQL Version 0.9.9b\n"); |
static final String versionID = new String("FM2SQL Version 0.9.10b\n"); |
|
|
private static boolean noError = false; |
private static boolean noError = false; |
|
|
Line 601 class Convert
|
Line 601 class Convert
|
{ |
{ |
command = new StringBuffer().append(creates.get(tbIndex).toString()); |
command = new StringBuffer().append(creates.get(tbIndex).toString()); |
} |
} |
|
System.out.println("create statement: "+command.toString()); |
stm.executeUpdate(command.toString()); |
stm.executeUpdate(command.toString()); |
|
|
} |
} |
Line 838 class Convert
|
Line 839 class Convert
|
throws Exception, SQLException |
throws Exception, SQLException |
{ |
{ |
Vector row; |
Vector row; |
while ((row = bean.getNextRow()) != null) |
while ((row = bean.getNextRow()) != null) { |
{ |
|
j++; |
j++; |
Object obj = null; |
Object obj = null; |
for (int k = 0; k < row.size(); ++k) |
for (int k = 0; k < row.size(); ++k) { |
{ |
|
obj = row.get(k); |
obj = row.get(k); |
|
|
if (obj instanceof ArrayList) |
if (obj instanceof ArrayList) |
obj = formatFileMakerArray((List) obj, delimiter); |
obj = formatFileMakerArray((List) obj, delimiter); |
|
|
String str = (obj == null) ? "NULL" : obj.toString(); |
String str = (obj == null) ? "NULL" : obj.toString(); |
if (obj instanceof Double) |
if (obj instanceof Double) { |
{ |
|
pstm.setDouble(k + 1, ((Double) obj).doubleValue()); |
pstm.setDouble(k + 1, ((Double) obj).doubleValue()); |
} else if (!str.equals("NULL")) |
} else if (!str.equals("NULL")) |
pstm.setString(k + 1, str); |
pstm.setString(k + 1, str); |
Line 860 class Convert
|
Line 858 class Convert
|
} |
} |
pstm.execute(); |
pstm.execute(); |
if (isGUI) |
if (isGUI) |
dialog.progress.setValue((int) (((double) (j + 1) / (double) rowCount) * 100.0)); |
dialog.progress |
|
.setValue((int) (((double) (j + 1) / (double) rowCount) * 100.0)); |
command = null; |
command = null; |
} // to while loop |
} // to while loop |
return command; |
return command; |