Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class test {
- public static void main (String [] args) {
- String dbURL = "jdbc:sqlserver://localhost;databaseName=btcuoi;user=sa;password=1234";
- Connection conn = null;
- try {
- conn = DriverManager.getConnection(dbURL);
- } catch (SQLException ex) {
- Logger.getLogger(test.class.getName()).log(Level.SEVERE, null, ex);
- }
- if (conn != null) {
- System.out.println("Connected");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement