Feb-24-2022, 06:08 PM
(Feb-24-2022, 03:22 PM)hammer Wrote: fldSet: 'loc=?,aquired=?,disposition=?'6 bindings is correct, there are 6 placeholders (question marks) in "fldSet" and "criteria". But "argg" seems to have 35 values. It must be the number of characters. "argg" must be a tuple but it arrives as a string parameter and you think you can force it to be a tuple by putting parentheses around it. That does not work. Try this:
criteria: 'tagNo=? and tagClr=? and tagYr=?'
argg: 'Hermas,Purchased,Died,22,Red,2014'
...
The current statement uses 6, and there are 35 supplied.
values = tuple(argg.split(",")) self.c.execute (f'UPDATE cowTbl SET {fldSet} WHERE {criteria}', values)