Revision 6549
Added by ben leinfelder about 13 years ago
src/edu/ucsb/nceas/metacat/admin/upgrade/UpgradeNodeDataDatetime.java | ||
---|---|---|
108 | 108 |
" where nodeid = " + nodeid); |
109 | 109 |
pstmt.setTimestamp(1, dataTimestamp); |
110 | 110 |
pstmt.execute(); |
111 |
pstmt.close(); |
|
111 |
//pstmt.close();
|
|
112 | 112 |
|
113 | 113 |
System.out.println("processed: " + nodedata); |
114 | 114 |
count++; |
... | ... | |
117 | 117 |
} |
118 | 118 |
|
119 | 119 |
} |
120 |
} catch (SQLException sqle) { |
|
121 |
pstmt.close(); |
|
122 | 120 |
} catch (Exception e) { |
123 | 121 |
// do nothing, was not a valid date |
124 | 122 |
//e.printStackTrace(); |
125 |
} |
|
123 |
} finally { |
|
124 |
pstmt.close(); |
|
125 |
} |
|
126 | 126 |
} |
127 | 127 |
System.out.println("Table: " + tableName + " complete. " + count + " values converted."); |
128 | 128 |
|
Also available in: Unified diff
make sure we close the prepared statement always