Advertisement
Guest User

Untitled

a guest
May 20th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. public class zv130256 extends Funkcionalnosti{
  2.  
  3. private Connection connection = null;
  4.  
  5. public zv130256(){
  6. String connectionString = "jdbc:sqlserver://localhost:1433;databaseName=zv130256;username=NAME;password=PASS";
  7.  
  8. try {
  9. connection = DriverManager.getConnection(connectionString);
  10. System.out.println("Uspesno povezivanje sa bazom!");
  11. //statement = connection.createStatement();
  12. } catch (SQLException ex) {
  13. Logger.getLogger(zv130256.class.getName()).log(Level.SEVERE, null, ex);
  14. System.out.println("Greska prilikom povezivanja sa bazom!");
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement