A mistake that comes up when you do a little exercise, pay first.
For
' WHERE idcard= ' 123412199507082314 ' at line 1
It's been looking for a long while, no problem, wrong code.
PrivateStudent Searchstudent (intsearchtype) { String sql = "Select Flowid,type,idcard,examcard,studentname" + ", location, grade" + " from E Xamstudent "+" WHERE "; Scanner Scanner=NewScanner (system.in);//1. Determine how the query is based on the input searchtype//2. Determine the SQL statement according to SearchType if(searchtype==1) {System.out.print ("Please enter your ID number:"); String Idcard=Scanner.next (); SQL =sql+ "idcard=" "+idcard+" "; }Else{System.out.print ("Please enter the ticket number:"); String Examcard=Scanner.next (); SQL =sql+ "examcard=" "+examcard+" "; }
This red part of the problem has not been found
The final discovery is actually the first red part of the grade and from the from between no space caused by ....
Learn something about JDBC (some of the mistakes that occur during the learning process)