Code example for Statement

Methods: executeUpdate, setQueryTimeout

0
				st = con.createStatement();
				String insertLine = 
						"INSERT INTO dishRating " + "VALUES " + 
								"('" + user + "', '" + date + "', '"+dishName + "', "+rating+");";
				System.out.println(insertLine);
				st.setQueryTimeout(5);
				st.executeUpdate(insertLine);
				System.out.println("server insert");
			} catch (SQLException e) {
				// TODO Auto-generated catch block 
				System.out.println("no connection!!!"+"insert");
				//error(context); 
				e.printStackTrace();
			} 
		}else{ 
			System.out.println("Database Server Error: Insert");
			error(context);
		} 
	} 
	 
	public void update(String user, String date, String dishName, float rating){