The problem is the way you’re building your query string. String values need to be wrapped in single quotes, otherwise they will be interpreted as DB objects (table name, column name, …).
strConsulta= "insert into tabla(nombre,autor,year) values ('"+nombre1+"','"+autor1+"',"+year1+")"
You can avoid this issue by using parameterized queries:
params = [nombre1, autor1, year1]
strConsulta= "insert into tabla(nombre,autor,year) values (?,?,?)"
consulta.execute(strConsulta, params)
solved I need help!!! error with input in sqlite3, I’m new to this [closed]