@SuppressWarnings("deprecation")
	public void insertRecord(Record record) {
		// TODO Auto-generated method stub

		String sql = "INSERT INTO MESSAGE (id, longitude, latitude, content, tag, date)"
				+ "VALUES(?,?,?,?,?,?)";
		Connection conn = null;
		try{
			conn = dataSource.getConnection();
			PreparedStatement ps = conn.prepareStatement(sql);
			ps.setString(1, String.valueOf(getNum(conn)+1));
			ps.setFloat(2, record.getLocation().getLongitude());
			ps.setFloat(3, record.getLocation().getLatitude());
			ps.setString(4, record.getContent());
			ps.setString(5, record.getTag());
			ps.setString(6, record.getDate().toLocaleString());
			ps.executeUpdate();
			ps.close();
		} catch (SQLException e){
			e.printStackTrace();
		} finally{
			if (conn != null){
				try {
					conn.close();
				} catch (SQLException e){}
			}
		}
		

	}