3
I have a problem where I can not add anything in the table and always appears the error:
sqlite3.Interfaceerror: Error Binding Parameter 0 - probably Unsupported type.
The code I’m trying to add values and this:
p_name=input("Digite o nome do produto: "),
p_desc=input("Digite a descrição: "),
p_costp=input("Digite o preço de custo: "),
p_sellp=input("Digite o preço de venda: ")
c.execute("INSERT INTO products (name,description,costp,sellp) VALUES
(?,?,?,?)",(p_name,p_desc,p_costp,p_sellp))
And my Table:
c.execute("CREATE TABLE IF NOT EXISTS products(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT,
description TEXT,
costp REAL,
sellp REAL)")
Insert with predefined values works well, but values received from the user I can’t and always appears this error.