import java.sql.*;
import java.util.ArrayList;

public class DatabaseConnection {
public static Connection dbcon;
	public static void InsertData(ArrayList<String> array, String path) {
		try {
			Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
			dbcon = DriverManager.getConnection("jdbc:sqlserver://serverName:1025;databaseName=complet;user=team3;password=2016;");
		    dbcon.close();
		} catch (Exception e) {
			System.err.println(e);
		}
	}
}

@@ -381,24 +381,462 @@
 ;%0A%09%09
-    dbcon.close(
+%09Statement stmt = dbcon.createStatement();%0A%09%09%09String pathHtml;%0A%09%09%09int position;%0A%09%09    for(int i = 0; i %3C array.size(); i++) %7B%0A%09%09        position = i;%0A%09%09%09%09pathHtml = path + %22/%22 + Integer.toString(i) + %22.html%22;%0A%09%09%09%09stmt.executeUpdate(%22INSERT INTO DatabaseOfURLs VALUES('%22 + position + %22','%22 + array.get(i) + %22','%22 + pathHtml + %22')%22);%0A            %7D%0A    %09%09stmt.close();%0A%09%09    dbcon.close();%0A%0A        %7D catch (SQLException sqle) %7B%0A%09%09%09%09%09System.err.println(sqle
 );%0A%09

Insert data -position, urls, pathx.html- in sql server and add SQLException