Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package demo;
- import java.sql.SQLException;
- public class Main {
- public static void main(String[] args) throws SQLException {
- java.sql.Timestamp date = new java.sql.Timestamp(new java.util.Date().getTime());
- ConnectionFactory cf = new ConnectionFactory("jdbc:mysql://localhost:3306/sakila", "root", "alternanza");
- Persona p2 = new Persona("mikym", "Marisaldi", "Michele", "Bologna", "prova1",date,33333);
- try {
- Class.forName("com.mysql.jdbc.Driver");
- Dao d = new Dao(cf.getConnection());
- //d.getAllCognomi();
- //d.getAllNomi();
- //d.getAllUsername();
- //d.getAllId();
- //d.insertPersona(p2);
- for(int i = 0; i <910000; i++) {
- d.riempiTabella();
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- finally {
- cf.close();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement