public static int add(String mydate, String sort, String caption, String comments) {
        int resultID = -1;
        mydate="'"+mydate+"'";
        sort="'"+sort+"'";
        caption="'"+caption+"'";
        comments="'"+comments+"'";
        sql="INSERT INTO Notepad (mydate,sort,caption,comments) VALUES "+ "(" + mydate + ","+sort+"," +caption + "," + comments + ")";
        DB.sql(sql);

        String sql2= "Select * from Notepad where caption="+caption;
        ResultSet rs=DB.sqlQuery(sql2);

        try {
            while (rs.next()){
                resultID=rs.getInt("ID");
            }

        } catch (SQLException e) {
            e.printStackTrace();
        }

        return resultID;
    }