Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package sandbox;
- import java.sql.Connection;
- import java.sql.DriverManager;
- import java.sql.SQLException;
- import java.sql.Statement;
- /**
- *
- * @author Jesper
- */
- public class Sandbox {
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) throws ClassNotFoundException, SQLException{
- Connection con = connectionSetup();
- Statement stmt = con.createStatement();
- String test = "INSERT INTO execution_times VALUES (null, 55)";
- stmt.executeUpdate(test);
- }
- public static Connection connectionSetup() throws ClassNotFoundException, SQLException{
- Class.forName("com.mysql.jdbc.Driver");
- Connection con = DriverManager.getConnection("jdbc:mysql:///KOD", "root", "sudo");
- con.setAutoCommit(false);
- return con;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement