Advertisement
Guest User

conn

a guest
May 8th, 2016
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package projektmistrzostwa;
  7.  
  8. import java.sql.Connection;
  9. import java.sql.DriverManager;
  10. import javax.swing.JOptionPane;
  11.  
  12. public class Connect {
  13.  
  14. public static Connection conn = null;
  15.  
  16. public static void Polaczenie() {
  17.  
  18. try {
  19.  
  20. conn = DriverManager.getConnection("jdbc:oracle:thin:@oraas:1521:ora2014", "login", "haselo");
  21. System.out.println("Polaczono");
  22.  
  23. } catch (Exception e) {
  24. JOptionPane.showMessageDialog(null, e);
  25. }
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement