Advertisement
Guest User

Untitled

a guest
Jun 15th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. private void getConexao(){
  2. try {
  3. Class.forName("com.mysql.jdbc.Driver");
  4. } catch (ClassNotFoundException ex) {
  5. Logger.getLogger(vendas.class.getName()).log(Level.SEVERE, null, ex);
  6. }
  7. try {
  8. con = DriverManager.getConnection("jdbc:mysql:=//localhost:3306/vendas", "root", "");
  9. } catch (SQLException ex) {
  10. Logger.getLogger(vendas.class.getName()).log(Level.SEVERE, null, ex);
  11. }
  12.  
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement