I wonder why this does not insert data :-O
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import = "java.sql.*" %>
<%--@page import = "dbfiles.*" --%>
<%
//VDbManager mgr = new VDbManager();
String sqlApp = "INSERT INTO application VALUES (NULL, 810, 2010-08-26, 2010-10-27, 30, \"Dummy Leave\", \"Dummy Reason \", \"Applied \")";
Class.forName("com.mysql.jdbc.Driver");
Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/lam", "root", "ilovejesus");
Statement st = connection.createStatement();
int i = 1000;
out.println("Entering the loop...");
while (i > 0) {
/*mgr.dbChange(sqlApp);
mgr.dbChange(sqlApproval);
mgr.dbChange(sqlUser);
*/
try {
st.executeUpdate(sqlApp);
st.executeUpdate(sqlApproval);
st.executeUpdate(sqlUser);
out.println(i + "<br />");
} catch (Exception e) {
e.printStackTrace();
}
i--;
}
out.println("Done!");
connection.close();
%>