Jan-02-2022, 03:06 PM
I have compared this code with similar queries that work. Can anyone see what I am missing that is causing the Syntax Error?
Error:Exception has occurred: OperationalError (note: full exception trace is shown but execution is paused at: <module>) near "tagNo": syntax error File "/home/mark/Python Environments/FirstEnvProject/Bovine8.py", line 92, in insert_Cow self.c.execute(""" INSERT INTO cowTbl File "/home/mark/Python Environments/FirstEnvProject/Bovine8.py", line 665, in cow_saveAdd self.db.insert_Cow( File "/home/mark/Python Environments/FirstEnvProject/Bovine8.py", line 1316, in <module> (Current frame) CreateApp().run()def insert_Cow(self,tagNo,tagClr,tagYr,type,des, loc,locDte,birthDte,birthWt,weanDte,weanWt,sex,status,aquired, aquiredDte,aquiredCst,disposition,dispDte,soldAmt,bredDte, bullTagNo,bullTagClr,bullTagYr,actCalvDte,calfTagNo,calfTagClr,calfTagYr): self.c.execute(""" INSERT INTO cowTbl VALUES tagNo=?, tagClr=?, tagYr=?, type=?, desc=?, loc=?, locDte=?, birthDte=?, birthWt=?, weanDte=?, weanWt=?, sex=?, status=?, aquired=?, aquiredDte=?, aquiredCst=?, disposition=?, dispositionDte=?, soldAmt=?, bredDte=?, bredByTag=?, bredByTagClr=?, bredByTagYr=?, actCalvDte=?, calfTagNo=?, calfTagClr=?, calfTagYr=? """, (tagNo,tagClr,tagYr,type,des,loc,locDte,birthDte,birthWt,weanDte,weanWt,sex,status,aquired, aquiredDte,aquiredCst,disposition,dispDte,soldAmt,bredDte, bullTagNo,bullTagClr,bullTagYr,actCalvDte,calfTagNo,calfTagClr,calfTagYr)) self.con.commit() 