This question already has an answer here:
- What does a “Cannot find symbol” compilation error mean? 12 answers
I'm getting a cannot find symbol error and it points to the period right in rs.getChars(1)
This code is all within a try{}
.
There are three columns in the view table, title, item_id, and name. I'm just trying to query it but get a cannot find symbol on the line inside the start of the while loop.
PreparedStatement pstmt=
conn.prepareStatement("SELECT * FROM Film_Sound_Track");
ResultSet rs = pstmt.getResultSet();
while(rs.next()){
char item_id = rs.getChars(1);
}
rs.close();
pstmt.close();