Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static Connection con = null;
- public static Statement stmt;
- public static boolean connectionMade;
- public static void createConnection() {
- try {
- Class.forName("com.mysql.jdbc.Driver").newInstance();
- String IP="pkpassage.co.uk";
- String DB="web86-vote";
- String User="web86-vote";
- String Pass="kauwgom1";
- con = DriverManager.getConnection("jdbc:mysql://"+IP+"/"+DB, User, Pass);
- stmt = con.createStatement();
- } catch (Exception e) {
- Logger.log("VoteManager", "Connection to SQL database failed!");
- e.printStackTrace();
- }
- }
Add Comment
Please, Sign In to add comment