Advertisement
Guest User

Untitled

a guest
Sep 24th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.38 KB | None | 0 0
  1. import java.sql.*;
  2.  
  3. public class JDBCConnection {
  4.     private static String username = "sa";
  5.     private static String password = "INFdev1";
  6.     private static String connString = "jdbc:sqlserver://localhost:1433;database=Registration";
  7.    
  8.     public static Connection getConnection() throws SQLException {
  9.         return DriverManager.getConnection(connString, username, password);
  10.        
  11.     }
  12.  
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement