I am currently having an issue.
I use the usual insertion query:
(Mydatabase connection here and it's okay)
My Insertion sql query code:
cursor.execute("INSERT INTO table(surname, othername, dept, course) VALUES(?,?,?,?)",
(
self.surnamefield.text(),
self.othernamefield.text(),
self.deptfield.text(),
self.coursefield.text()
)
self.conn.commit
Whenever I try to insert values from my GUI, it comes up with an error message:
Incorrect number of bindings supplied. The current statement uses 1, and there are 0 supplied.
My code works perfectly fine on Microsoft SQL server and MySql server. I don't know why SQLite is giving me problem.
I have tried to use: VALUES[?,?,?,?,] it gave same error message.
I also tried;
[
self.surnamefield.text(),
self.othernamefield.text(),
self.deptfield.text(),
self.coursefield.text()
]
It also gave same error message.
I tried:
[
self.surnamefield.text(),
self.othernamefield.text(),
self.deptfield.text(),
self.coursefield.text(),
]
It also gave same error message.
I am using Python and SQLite3
Have you any clue on how to resolve it please? If yes, kindly suggest it here. Thanks

I am currently having an issue.
I use the usual insertion query:
(Mydatabase connection here and it's okay)
My Insertion sql query code:
Whenever I try to insert values from my GUI, it comes up with an error message:
Incorrect number of bindings supplied. The current statement uses 1, and there are 0 supplied.
My code works perfectly fine on Microsoft SQL server and MySql server. I don't know why SQLite is giving me problem.
I have tried to use: VALUES[?,?,?,?,] it gave same error message.
I also tried;
It also gave same error message.
I tried:
It also gave same error message.
I am using Python and SQLite3
Have you any clue on how to resolve it please? If yes, kindly suggest it here. Thanks