java - SQL error or missing database (no such column: RollNo) -
i writing java code using eclipse ide , sqlite (as database) , on executing sql query using statements:
string query="select name,surname,fees,rollno,adno student class='"+1+"'"; preparedstatement pst=c.preparestatement(query); resultset rs=pst.executequery();
i got error:
sql error or missing database (no such column: rollno)
where name,surname,fees,rollno,adno valid , exact names of columns in table student
but when passing query(given below) using same set of statements displaying whole table correctly
string query="select * student class='"+1+"'"; preparedstatement pst=c.preparestatement(query); resultset rs=pst.executequery();
what problem code need rename columns although have tried names roll_no , ad_no showing same error.
Comments
Post a Comment