Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (checkDriver("com.mysql.jdbc.Driver"))
- System.out.println(" ... OK");
- else
- System.exit(1);
- Connection con = getConnection("jdbc:mysql://", "localhost", 3306, "root", "");
- Statement st = createStatement(con);
- // próba wybrania bazy
- if (executeUpdate(st, "USE lab_java;") == 0)
- System.out.println("Baza wybrana");
- else
- System.out.println("Baza nie istnieje!");
- String sql = "SELECT * FROM questions";
- ResultSet result = executeQuery(st,sql);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement