Code example for ResultSet

Methods: getString, next

0
                         
			prepstmnt.setString(1,androidUser.getUsername() );//
			prepstmnt.setString(2,androidUser.getPassword() );//
			 
			ResultSet result=prepstmnt.executeQuery();
			result.next();
			 
			//0-user_id, 1-user_name, 2-password, 3-email, 4-discription 
			 
				Auser=new AndroidUser(
						result.getString(1), 
						result.getString(2), 
						result.getString(3), 
						result.getString(4),
						result.getString(5),
						"", "");	// longitude and latitude of android user not used 
				 
			 
		} catch (Exception e) {
			// TODO: handle exception 
                    System.out.println("error in finding android user "+ e.toString());