Tags
Asked 4 years ago
14 Aug 2020
Views 3252
steave

steave posted

sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current sta tement uses 1, and there are 2 supplied.


pageval=("82")
insertstmtpage = "insert into pages values(?)"
c.execute(insertstmtpage,pageval)


it giving me error like

sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current sta tement uses 1, and there are 2 supplied.

but i think i supplied proper value which is text and i supplied one value to current statement . and it saying you supplied which is wrong .

so not sure what is wrong ?
steave ray

steave ray
answered Nov 30 '-1 00:00


pageval=("82",)
insertstmtpage = "insert into pages values(?)"
c.execute(insertstmtpage,pageval)


pass the comma after the value .
Post Answer