java - Column does not exist in sql -


java.sql.sqlexception: column 'movie_borr' not found. 

i column exists in database created.

resultset rs = stmt.executequery("select movie_id, movie_name, movie_dateborrowed movie_tbl movie_borr = '"+useruserid+"'");                 if(rs.next()){                     string moviebo = rs.getstring("movie_borr");                     joptionpane.showmessagedialog(null, moviebo);                 } 

when name column in getstring, column must listed in select clause. add movie_borr list of columns after select.

edit sorry, @wxyz - didn't see got there first. if post answer, i'll delete mine!


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -