/*
 * test.java
 *
 * Created on 4. décembre 2002, 10:38
 */

/**
 *
 * @author  aubry
 */
import java.sql.*;
import org.postgresql.*;

public class test {
    
    /** Creates a new instance of test */
    public test() {
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        
        java.sql.Connection conn = null;
        java.sql.Statement stmt = null;
        int counter = 0;
        
        try {
            Class.forName("org.postgresql.Driver");
            stmt = DriverManager.getConnection(new StringBuffer().append("jdbc:postgresql://192.168.1.141:5432/Billetel?charSet=LATIN1").toString(), "postgres", "").createStatement();

            for(int i=1; i<=600; i++) {
                try {
                    int row = 0;
                    counter++;
                    System.out.print("\r"+counter);
                    Runtime rt = Runtime.getRuntime();
                    synchronized(rt) {rt.wait(1000);}
                    row = stmt.executeUpdate("INSERT INTO t_contenu_item_devise VALUES (322000000663, 54009, '2002-10-25 21:06:22+02', '2002-10-25 21:06:22+02', 54, 37, 322000000033, 0.00, 54009);");
                    System.out.println("  "+row);
                }
                catch(SQLException e) {
                    System.out.println("  error "+counter+" "+e.getMessage().replace('\n', ' '));
                }
            }
        }
        catch(Exception ee) {
            System.out.println(ee.toString());
        }
                
    }
    
}
