Compare commits

...

2 Commits

Author SHA1 Message Date
91405f2dfe v0.31 2022-10-20 22:05:39 -04:00
3c0f249492 set value as NULL if getString returns null an wasNull fails 2022-10-20 22:03:54 -04:00

View File

@ -35,7 +35,7 @@ public class jrunner {
Integer cols = null; Integer cols = null;
String[] dtn = null; String[] dtn = null;
msg = "jrunner version 0.30"; msg = "jrunner version 0.31";
msg = msg + nl + "-scu source jdbc url"; msg = msg + nl + "-scu source jdbc url";
msg = msg + nl + "-scn source username"; msg = msg + nl + "-scn source username";
msg = msg + nl + "-scp source passowrd"; msg = msg + nl + "-scp source passowrd";
@ -193,6 +193,10 @@ public class jrunner {
nr = ""; nr = "";
for (int i = 1; i <= cols; i++){ for (int i = 1; i <= cols; i++){
nc = rs.getString(i); nc = rs.getString(i);
if (dtn[i] == "DATE" && nc == "null") {
nc = "NULL";
}
else {
if (rs.wasNull()) { if (rs.wasNull()) {
nc = "NULL"; nc = "NULL";
} else { } else {
@ -233,6 +237,7 @@ public class jrunner {
break; break;
} }
} }
}
if (i != 1){ if (i != 1){
nr = nr + ","; nr = nr + ",";
} }