I have a DB in sqlite that is inside the project folder netbeans .
C: \ users \ user \ documents \ netbeans \ project folder
And I insert in
The message:
SQL Exception saying: No such table: subjects
indicates that the "asignaturas" table does not exist, it ensures that it really is within your database BBDD.db
.
Another detail that can cause the problem is that you do not specify the name of the database file correctly, since it creates an empty database and therefore the table would not exist.
update: Remove the single quotes from the name of the table when building your querystring ::
String cadenita="insert into asignaturas values('"+casignatura.getText()+"','"+cdpto.getText()+"','"+Integer.parseInt(caprobados.getText())+"','"+Integer.parseInt(csuspensos.getText())+"','"+Integer.parseInt(ctotal.getText())+"','"+Integer.parseInt(cporaprobados.getText())+"','"+Integer.parseInt(cporsuspensos.getText())+"');";