를 선택 나는 SQL 쿼리가 그 작동하지 않습니다는 NumberFormatException : 입력 문자열의 경우 :
Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string: "select age from actress where name = 'omg'"
"OMG"내 Combox가에서 선택 이름입니다 :
String name = comboBoxgetSelectedItem().toString(); //Getting name from ComboBox
String age = "select age from actress where name = '" +namn+ "'"; //Get age from previous name
int TheAge = Integer.parseInt(age); //Want the age to be stored as int
이 다음과 같은 오류를 제공합니다 첫 번째 코드 줄
구문 분석을 시도하기 전에 쿼리를 실행 했습니까? –
"데이터베이스에서 물건 가져 오기"코드 – Bohemian
forloop에서 "물건 가져 오기"를 추가로 받았습니다. – user2432626