Revision 1751
Added by Jing Tao almost 21 years ago
ReplicationServerList.java | ||
---|---|---|
28 | 28 |
|
29 | 29 |
package edu.ucsb.nceas.metacat; |
30 | 30 |
|
31 |
import edu.ucsb.nceas.dbadapter.AbstractDatabase; |
|
31 | 32 |
import java.util.Vector; |
32 | 33 |
import java.sql.*; |
33 | 34 |
|
... | ... | |
38 | 39 |
public class ReplicationServerList |
39 | 40 |
{ |
40 | 41 |
private static Vector serverList = null; //Vector to store server list |
42 |
private static final AbstractDatabase dbAdapter = MetaCatUtil.dbAdapter; |
|
41 | 43 |
|
42 | 44 |
/** |
43 | 45 |
* constructor of ReplicationServerList |
... | ... | |
442 | 444 |
getDBConnection("ReplicationSErverList.addToServerListIfItIsNot"); |
443 | 445 |
serialNumber=dbConn.getCheckOutSerialNumber(); |
444 | 446 |
// Inser it into xml_replication table |
445 |
pStmt = dbConn.prepareStatement("INSERT INTO xml_replication " + |
|
447 |
/*pStmt = dbConn.prepareStatement("INSERT INTO xml_replication " +
|
|
446 | 448 |
"(server, last_checked, replicate, datareplicate, hub) "+ |
447 | 449 |
"VALUES ('" + givenServerName + "', to_date(" + |
448 | 450 |
"'01/01/00', 'MM/DD/YY'), '" + |
451 |
replicate +"', '"+dataReplicate+"','"+ hub + "')");*/ |
|
452 |
pStmt = dbConn.prepareStatement("INSERT INTO xml_replication " + |
|
453 |
"(server, last_checked, replicate, datareplicate, hub) "+ |
|
454 |
"VALUES ('" + givenServerName + "', "+ |
|
455 |
dbAdapter.toDate("01/01/00","MM/DD/YY") + ", '" + |
|
449 | 456 |
replicate +"', '"+dataReplicate+"','"+ hub + "')"); |
450 | 457 |
pStmt.execute(); |
458 |
MetaCatUtil.debugMessage("7, new sql for todate:================== ", 1); |
|
451 | 459 |
pStmt.close(); |
452 | 460 |
}//try |
453 | 461 |
catch (Exception e) |
Also available in: Unified diff
Get rid of to_date function.