Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void createNewProject(String name, String desc, String startingDate, String expectedFinishDate) throws SQLException {
- String url = "jdbc:postgresql://158.75.112.103:55655/pz2020";
- String user = "pz2020";
- String password = "P3zetka";
- Connection conn = DriverManager.getConnection(url, user, password);
- CallableStatement cst = conn.prepareCall("SELECT * FROM func_create_new_project( '"+ name +"', '" + desc + "', '" + startingDate + "', '" + expectedFinishDate + "')");
- ResultSet rs = cst.executeQuery();
- while(rs.next()){
- System.out.print(rs.getInt(1));
- //setNewId(rs.getInt(1));
- }
- rs.close();
- cst.close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement