Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package cirobd;
- import java.sql.*;
- public class conexao {
- public conexao() {
- try{
- Class.forName("com.mysql.jdbc.Driver");
- Connection conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/dbagenda","root","root");
- System.out.println("OK:Conexão OK");
- } catch(Exception e){
- System.out.println(e);
- System.out.println("Erro2 SQL"+e.getMessage());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement