try { if (oConn.getDataBaseProduct()!=JDCConnection.DBMS_POSTGRESQL) oInsrt.setQueryTimeout(60); } catch (SQLException sqle) { /* ignore */}
if (oAppendedList.getShort(DB.tp_list)==TYPE_DYNAMIC) {
QueryByForm oQBF = new QueryByForm(oConn, DB.k_member_address, "b", oAppendedList.getString(DB.gu_query));
sSQL = "SELECT b." + DB.tx_name + ",b." + DB.tx_surname + ",b." + DB.tx_salutation + ",1,b." + DB.gu_company + ",b." + DB.gu_contact + ",'TXT', a." + DB.tx_email + " FROM " + DB.k_x_list_members + " a, " + DB.k_member_address + " b WHERE a." + DB.gu_list + "='" + getString(DB.gu_list) + "' AND b." + DB.gu_workarea + "='" + oAppendedList.getString(DB.gu_workarea) + "' AND (" + oQBF.composeSQL() + ") AND a." + DB.tx_email + "=b." + DB.tx_email;
}
else
sSQL = "SELECT b." + DB.tx_name + ",b." + DB.tx_surname + ",b." + DB.tx_salutation + ",b." + DB.bo_active + ",b." + DB.gu_company + ",b." + DB.gu_contact + ",b." + DB.id_format + ", a." + DB.tx_email + " FROM " + DB.k_x_list_members + " a, " + DB.k_x_list_members + " b WHERE a." + DB.gu_list + "='" + getString(DB.gu_list) + "' AND b." + DB.gu_list + "='" + sListGUID + "' AND a." + DB.tx_email + "=b." + DB.tx_email;
if (DebugFile.trace) DebugFile.writeln("Statement.executeQuery(" + sSQL + ")");