Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Connection con =null;
- Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
- String connectionURL="jdbc:sqlserver://localhost:1433;databaseName=guBanco;user=Honorato;password=1234";
- try{
- con=DriverManager.getConnection(connectionURL);
- System.out.println("Connection is successfull");
- }
- catch(SQLException e){
- System.out.println(e);
- }
- return con;
- }
- // TODO code application logic here
- connect();
- }
Add Comment
Please, Sign In to add comment