Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String sqlquery = "select count(*) from c_file"
- + " where ad_table_id=?"
- + " and ad_record_id=?";
- ConnectionProvider conn = new DalConnectionProvider();
- Connection connection;
- boolean hasAttachment = false;
- try {
- connection = conn.getConnection();
- PreparedStatement ps = connection.prepareStatement(sqlquery);
- ps.setString(1, "<diganti string table id nya requsition line>");
- ps.setString(1, "<diganti string id requition line>");
- ResultSet rs = ps.executeQuery();
- while (rs.next())
- hasAttachment=true;
- } catch (NoConnectionAvailableException e) {
- e.printStackTrace();
- throw new OBException(e.getMessage());
- } catch (SQLException e) {
- e.printStackTrace();
- throw new OBException(e.getMessage());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement