public void fetchMappingFile() {
- try (Connection con = DriverManager.getConnection(dBurl, user, pwd)) {
+ try (Connection con = DriverManager.getConnection(dBurl, user, pwd);PreparedStatement pstmt = con.prepareStatement("SELECT * FROM mapping_file");ResultSet rs = pstmt.executeQuery()) {
LOGGER.info("Retrieving data from DB");
- PreparedStatement pstmt = con.prepareStatement("SELECT * FROM mapping_file");
- ResultSet rs = pstmt.executeQuery();
// parsing the column each time is a linear search
int column1Pos = rs.findColumn("enterpriseid");
int column2Pos = rs.findColumn("mappingfilecontents");