public void updateAgent(Agent agent)
	{
		int numRows;
		//update sql statement constructed
        String sql = "UPDATE agents SET "
        	+ "agtfirstname='" + agent.getAgentFirstName()
        	+"', agtmiddleinitial='" + agent.getAgentMI()
        	+"', agtlastname='" + agent.getAgentLastName()
        	+"', agtbusphone='" + agent.getAgentPhone()
        	+"', agtemail='" + agent.getAgentEmail()
        	+"', agtposition='" + agent.getAgentPosition()
        	+"', agencyid='"+ agent.getAgencyId()
        	+"' WHERE agentid=" + agent.getAgentId();
        	
        System.out.println(sql);
        try 
        {
        	PreparedStatement preparedStatement = conn.prepareStatement(sql);
        	
        	// execute update SQL statement
        	numRows =  preparedStatement.executeUpdate();
        	if (numRows == 0)
        	{
        		System.out.println("update failed");
        	}
        	else
        	{
        		System.out.println("updated " + numRows + " row(s)");
        		conn.commit();
        	}
        } catch (SQLException e) {
			e.printStackTrace();
		}         	
        
	}