can not find the table?

1

I have a DB in sqlite that is inside the project folder .

  

C: \ users \ user \ documents \ netbeans \ project folder

And I insert in

asked by Nephilina 05.06.2016 в 02:55
source

1 answer

0

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())+"');";
    
answered by 05.06.2016 в 03:02