<%@page contentType="text/html" import="java.sql.*"%> <%@page pageEncoding="UTF-8"%> JSP Page <%-- --%> <%-- --%> <%-- --%> <% try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); %>hello 1<% String url = "jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)};DBQ=mars.netanya.ac.il:5080/~coheosh2/db.mdb"; %>hello 2<% Connection jdbcConnection = DriverManager.getConnection(url); %>hello 3<% Statement sqlStatement = jdbcConnection.createStatement(); %>hello 4<% /* Delete the data in the current table */ sqlStatement.executeUpdate(" DELETE id,comp,model,max,min,weight,engine,submitted FROM runners"); // Statement stmt = jdbcConnection.createStatement(); String name; /* Set all the runners in the table */ Race.Runner[] runners=RaceMNG.getRunners(); for(int i=0;i id : <%= results.getString(1)+'\n' %> compmany : <%= results.getString(2)%>
<% } } catch (Exception e) { out.println("SQL FAILED:" + e.getMessage()); } %>