<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" import="java.sql.*"%>
<%
	try
	{
		Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
		Connection conn = DriverManager.getConnection("jdbc:odbc:Northwind");
		Statement stmt = conn.createStatement();
		
		String sql = "UPDATE Employees ";
		sql += "SET " + request.getParameter("field") + "='" + request.getParameter("value") + "'";
		sql += " WHERE EmployeeID = " + request.getParameter("eid");

		stmt.executeUpdate(sql);
	
		response.sendRedirect("EmployeeForm.jsp?eid=" + request.getParameter("eid")) ;
	}
	catch (Exception e)
	{
		out.write("Failed: <br/> " + e.toString());
	}
%>