Guest User

Untitled

a guest
Feb 26th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. Connection conexion = null;
  2. Statement st = null;
  3. ResultSet rs = null;
  4. try {
  5. Class.forName("com.mysql.jdbc.Driver");
  6. conexion = DriverManager.getConnection("jdbc:mysql://localhost/desemb", "root", "");
  7. st = conexion.createStatement();
  8. st.executeUpdate("insert into desembarcos values (null,'"+anio+"','"+mes+"','"+region+"','"+tonelada +"','"+especie+"')");
  9. request.getRequestDispatcher("ingresartipo.jsp").forward(request, response);
  10. conexion.close();
  11. } catch (Exception e) {
  12. }
Add Comment
Please, Sign In to add comment