if (thisColumn == null) sb.append("NULL,"); else sb.append("'"+thisColumn+"',");
if (thisColumn == null) { sb.append("NULL,"); } else { sb.append("'"+thisColumn+"',"); }
  protected void insertShortRow(Logger logger, Statement s, ResultSet rs, 				int position, String tablename, int count) {    try {      StringBuffer sb = new StringBuffer();      sb.append("insert into "+tablename+" values (");      sb.append("'"+count+"',");      if (position==1) {	for(int i=1;i<=rs.getMetaData().getColumnCount();i++) {	  String thisColumn = rs.getString(i);	  if (thisColumn == null) sb.append("NULL,");	  else sb.append("'"+thisColumn+"',");	}	for(int i=1;i<=rs.getMetaData().getColumnCount();i++) {	  sb.append("NULL,");	}      } else if (position==2) {	for(int i=1;i<=rs.getMetaData().getColumnCount();i++) {	  sb.append("NULL,");	}	for(int i=1;i<=rs.getMetaData().getColumnCount();i++) {	  String thisColumn = rs.getString(i);	  if (thisColumn == null) sb.append("NULL,");	  else sb.append("'"+thisColumn+"',");	}      } else {	logger.logMessage(Logger.ERROR,Logger.GENERIC,			  "Incorrect position field in row insertion");      }      sb.deleteCharAt(sb.length()-1); // remove trailing ,      sb.append(")");      // System.out.println(sb.toString());      s.executeQuery(sb.toString());    } catch (SQLException e){      logger.logMessage(Logger.ERROR,Logger.DB_WRITE, 			"Problem inserting row",e);    }  }