Code example for Statement

Methods: executeQuery

0
			st = conn.createStatement();
 
			// 4.Ö´ÐÐÓï¾ä 
//			rs = st.executeQuery("select count(*)  from user where account='"+account+"' and password = '"+password+"'"); 
//			rs = st.executeQuery("select *  from user where account='"+acc+"' and password ='"+pass+"'"); 
			rs = st.executeQuery("select  count(*)  from user where account='"+acc+"' and password ='"+pass+"'");
			while(rs.next()){
				num=rs.getInt(1);
				if(num==0){
					return false; 
				} 
				return true; 
			} 
			return false; 
		} finally { 
			JdbcUtils.free(rs, st, conn);
		}		 
		 
 
	 
	}